tizen 2.4 release
[framework/web/wrt-commons.git] / modules / core / src / single_instance.cpp
similarity index 90%
rename from modules_wearable/core/src/single_instance.cpp
rename to modules/core/src/single_instance.cpp
index 274b5f8..68ad11f 100644 (file)
@@ -21,7 +21,7 @@
  */
 #include <stddef.h>
 #include <dpl/single_instance.h>
-#include <dpl/log/log.h>
+#include <dpl/log/wrt_log.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
@@ -44,7 +44,7 @@ SingleInstance::~SingleInstance()
 
 bool SingleInstance::TryLock(const std::string &lockName)
 {
-    LogPedantic("Locking single instance: " << lockName);
+    WrtLogD("Locking single instance: %s", lockName.c_str());
 
     struct flock lock;
 
@@ -68,7 +68,7 @@ bool SingleInstance::TryLock(const std::string &lockName)
 
     // Was the instance successfuly locked ?
     if (result == 0) {
-        LogPedantic("Instance locked: " << lockName);
+        WrtLogD("Instance locked: %s", lockName.c_str());
 
         // It is locked now
         m_locked = true;
@@ -78,7 +78,7 @@ bool SingleInstance::TryLock(const std::string &lockName)
     }
 
     if (errno == EACCES || errno == EAGAIN) {
-        LogPedantic("Instance is already running: " << lockName);
+        WrtLogD("Instance is already running: %s", lockName.c_str());
         return false;
     }
 
@@ -92,7 +92,7 @@ void SingleInstance::Release()
         return;
     }
 
-    LogPedantic("Unlocking single instance");
+    WrtLogD("Unlocking single instance");
 
     // Unlock file
     struct flock lock;
@@ -120,6 +120,6 @@ void SingleInstance::Release()
 
     // Done
     m_locked = false;
-    LogPedantic("Instance unlocked");
+    WrtLogD("Instance unlocked");
 }
 } // namespace DPL