Change log tag WRT to WRT_INSTALLER
authorSoyoung Kim <sy037.kim@samsung.com>
Fri, 19 Jul 2013 03:03:48 +0000 (12:03 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 23 Jul 2013 10:32:45 +0000 (10:32 +0000)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] log tag is changed WRT_INSTALLER from WRT
[SCMRequest] N/A

Change-Id: Ic2661c6664776263088e4a0fcfd8263659f8f991

src/wrt-installer/wrt-installer.cpp
src/wrt-installer/wrt-installer.h
src/wrt-installer/wrt_installer_api.cpp

index 3913a62..5f1ed02 100644 (file)
@@ -117,15 +117,7 @@ void WrtInstaller::OnStop()
 void WrtInstaller::OnCreate()
 {
     LogDebug("Creating DummyClient");
-    fprintf(stderr,
-            "===========================================================\n");
-    fprintf(stderr, "# wrt-installer #\n");
-    fprintf(stderr, "# argc [%d]\n", m_argc);
-    fprintf(stderr, "# argv[0] = [%s]\n", m_argv[0]);
-    fprintf(stderr, "# argv[1] = [%s]\n", m_argv[1]);
-    fprintf(stderr, "# argv[2] = [%s]\n", m_argv[2]);
-    fprintf(stderr,
-            "===========================================================\n");
+    showArguments();
 
     AddStep(&WrtInstaller::initStep);
 
@@ -369,6 +361,28 @@ void WrtInstaller::showHelpAndQuit()
     Quit();
 }
 
+void WrtInstaller::showArguments()
+{
+    fprintf(stderr,
+            "===========================================================\n");
+    fprintf(stderr, "# wrt-installer #\n");
+    fprintf(stderr, "# argc [%d]\n", m_argc);
+    for (int i = 0; i < m_argc; i++) {
+        fprintf(stderr, "# argv[%d] = [%s]\n", i, m_argv[i]);
+    }
+    fprintf(stderr,
+            "===========================================================\n");
+    // for dlog
+    LogDebug("===========================================================");
+    LogDebug("# wrt-installer #");
+    LogDebug("# argc " <<  m_argc);
+    for (int i = 0; i < m_argc; i++) {
+        LogDebug("# argv[" << i << "] = " << m_argv[i]);
+    }
+    LogDebug("===========================================================");
+
+}
+
 void WrtInstaller::OnEventReceived(const WRTInstallerNS::QuitEvent& /*event*/)
 {
     LogDebug("Quiting");
@@ -1127,6 +1141,8 @@ int main(int argc, char *argv[])
 {
     UNHANDLED_EXCEPTION_HANDLER_BEGIN
     {
+        DPL::Log::LogSystemSingleton::Instance().SetTag("WRT_INSTALLER");
+
         // Output on stdout will be flushed after every newline character,
         // even if it is redirected to a pipe. This is useful for running
         // from a script and parsing output.
index 8f6a5bd..f8aeebd 100644 (file)
@@ -81,6 +81,7 @@ class WrtInstaller :
 
   private:
     void         showHelpAndQuit();
+    void         showArguments();
 
     // Events
     virtual void OnEventReceived(const WRTInstallerNS::QuitEvent &event);
index 91bae40..76ca44b 100644 (file)
@@ -83,9 +83,6 @@ static bool checkPaths()
 void wrt_installer_init(void *userdata,
                                   WrtInstallerInitCallback callback)
 {
-    // Set DPL/LOG MID
-    DPL::Log::LogSystemSingleton::Instance().SetTag("WRT");
-
     try {
         LogDebug("[WRT-API] INITIALIZING WRT INSTALLER...");
         LogDebug("[WRT-API] BUILD: " << __TIMESTAMP__);