DSWaylandCompositor: fix log message when get/release an instance 52/241652/1
authorSung-Jin Park <sj76.park@samsung.com>
Wed, 22 Jul 2020 05:49:45 +0000 (14:49 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 09:54:22 +0000 (18:54 +0900)
Change-Id: I0c698f7e5e259a8d142acc9a916c301cedd6467a
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/DSWaylandServer/DSWaylandCompositor.cpp

index fcbefa4..7951ca4 100644 (file)
@@ -252,15 +252,16 @@ DSWaylandCompositor *DSWaylandCompositor::getInstance()
 {
        std::lock_guard<std::mutex> tLock(__mutex);
 
+       DSLOG_INF("DSWaylandCompositor",
+                       "[Get] instance __refCount=%d !", __refCount);
+
        if (!__comp && (__refCount == 0))
        {
                __comp = new DSWaylandCompositor(new DSObject);
                DSLOG_INF("DSWaylandCompositor",
-                       "Get instance has been created !");
+                       "DSWaylandCompositor instance has been created !");
        }
 
-       DSLOG_INF("DSWaylandCompositor",
-                       "DSWaylandCompositor instance __refCount=%d !", __refCount);
        ++__refCount;
        return __comp;
 }
@@ -274,14 +275,14 @@ void DSWaylandCompositor::releaseInstance()
        if (__refCount < 0)
                __refCount = 0;
        DSLOG_INF("DSWaylandCompositor",
-                       "Release instance __refCount=%d !", __refCount);
+                       "[Release] instance __refCount=%d !", __refCount);
 
        if ((0 == __refCount) && __comp)
        {
                delete __comp;
                __comp = nullptr;
                DSLOG_INF("DSWaylandCompositor",
-                       "DSWaylandCompositor instance has been deleted !");
+                       "DSWaylandCompositor instance has been removed !");
        }
 }