[Libreoffice-commits] online.git: 2 commits - loolwsd/Admin.cpp loolwsd/ChildProcessSession.cpp loolwsd/LOOLKit.cpp loolwsd/LOOLWSD.cpp loolwsd/QueueHandler.hpp

Tor Lillqvist tml at collabora.com
Thu Apr 7 12:56:49 UTC 2016


 loolwsd/Admin.cpp               |    8 ++++----
 loolwsd/ChildProcessSession.cpp |    4 ++--
 loolwsd/LOOLKit.cpp             |   10 +++++-----
 loolwsd/LOOLWSD.cpp             |   10 +++++-----
 loolwsd/QueueHandler.hpp        |    4 ++--
 5 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 711674f7cec26a0dad8bcf4f733ca76e90e619bf
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Apr 7 15:56:23 2016 +0300

    Use Log::debug() here, too, for consistency

diff --git a/loolwsd/Admin.cpp b/loolwsd/Admin.cpp
index 893f9dc..3bb963e 100644
--- a/loolwsd/Admin.cpp
+++ b/loolwsd/Admin.cpp
@@ -453,7 +453,7 @@ void Admin::run()
 
     Util::setThreadName(thread_name);
 
-    Log::info("Thread started.");
+    Log::debug("Thread started.");
 
     _memStatsTimer.cancel();
     _cpuStatsTimer.cancel();
commit 4fdd6d684f060701aeb9a063aed60133f0e6cfab
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Apr 7 15:51:49 2016 +0300

    Reduce redundant information in logging
    
    The logging functions already display the thread name on all output
    lines. No need to mention it another time in the thread start and
    finish logging messages.

diff --git a/loolwsd/Admin.cpp b/loolwsd/Admin.cpp
index 2d7e2a8..893f9dc 100644
--- a/loolwsd/Admin.cpp
+++ b/loolwsd/Admin.cpp
@@ -337,7 +337,7 @@ void AdminRequestHandler::handleRequest(HTTPServerRequest& request, HTTPServerRe
 
     Util::setThreadName(thread_name);
 
-    Log::debug("Thread [" + thread_name + "] started.");
+    Log::debug("Thread started.");
 
     try
     {
@@ -367,7 +367,7 @@ void AdminRequestHandler::handleRequest(HTTPServerRequest& request, HTTPServerRe
         response.setContentLength(0);
         response.send();
     }
-    Log::debug("Thread [" + thread_name + "] finished.");
+    Log::debug("Thread finished.");
 }
 
 /// An admin command processor.
@@ -453,12 +453,12 @@ void Admin::run()
 
     Util::setThreadName(thread_name);
 
-    Log::info("Thread [" + thread_name + "] started.");
+    Log::info("Thread started.");
 
     _memStatsTimer.cancel();
     _cpuStatsTimer.cancel();
 
-    Log::debug("Thread [" + thread_name + "] finished.");
+    Log::debug("Thread finished.");
 }
 
 AdminModel& Admin::getModel()
diff --git a/loolwsd/ChildProcessSession.cpp b/loolwsd/ChildProcessSession.cpp
index 4d46330..2e4ecd4 100644
--- a/loolwsd/ChildProcessSession.cpp
+++ b/loolwsd/ChildProcessSession.cpp
@@ -202,7 +202,7 @@ public:
 
         Util::setThreadName(thread_name);
 
-        Log::debug("Thread [" + thread_name + "] started.");
+        Log::debug("Thread started.");
 
         while (!_stop && !TerminationFlag)
         {
@@ -233,7 +233,7 @@ public:
                 break;
         }
 
-        Log::debug("Thread [" + thread_name + "] finished.");
+        Log::debug("Thread finished.");
     }
 
     void stop()
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 205a1ad..5a0f453 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -281,7 +281,7 @@ public:
 
         Util::setThreadName(thread_name);
 
-        Log::debug("Thread [" + thread_name + "] started.");
+        Log::debug("Thread started.");
 
         try
         {
@@ -357,7 +357,7 @@ public:
             Log::error("Connection::run:: Unexpected exception");
         }
 
-        Log::debug("Thread [" + thread_name + "] finished.");
+        Log::debug("Thread finished.");
     }
 
 private:
@@ -898,11 +898,11 @@ void lokit_main(const std::string& childRoot,
 
     Util::setThreadName(process_name);
 
+    Log::debug("Process started.");
+
     Util::setTerminationSignals();
     Util::setFatalSignals();
 
-    Log::debug("Process [" + process_name + "] started.");
-
     static const std::string instdir_path = "/" + loSubPath + "/program";
     LibreOfficeKit* loKit = nullptr;
 
@@ -1079,7 +1079,7 @@ void lokit_main(const std::string& childRoot,
         Log::error(std::string("Exception: ") + exc.what());
     }
 
-    Log::info("Process [" + process_name + "] finished.");
+    Log::info("Process finished.");
     _exit(Application::EXIT_OK);
 }
 
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 0df0813..055a164 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -587,7 +587,7 @@ public:
 
         Util::setThreadName(thread_name);
 
-        Log::debug("Thread [" + thread_name + "] started.");
+        Log::debug("Thread started.");
 
         try
         {
@@ -621,7 +621,7 @@ public:
             Log::error("ClientRequestHandler::handleRequest: Unexpected exception");
         }
 
-        Log::debug("Thread [" + thread_name + "] finished.");
+        Log::debug("Thread finished.");
     }
 };
 
@@ -701,7 +701,7 @@ public:
 
             // Misleading debug message, we obviously started already a while ago and have done lots
             // of stuff already.
-            Log::debug("Thread [" + thread_name + "] started.");
+            Log::debug("Thread started.");
 
             Log::debug("Child socket for SessionId: " + sessionId + ", jailId: " + jailId +
                        ", docKey: " + docKey + " connected.");
@@ -792,7 +792,7 @@ public:
             Admin::instance().update(message.str());
         }
 
-        Log::debug("Thread [" + thread_name + "] finished.");
+        Log::debug("Thread finished.");
     }
 };
 
@@ -1534,7 +1534,7 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
     Poco::Net::uninitializeSSL();
     Poco::Crypto::uninitializeCrypto();
 
-    Log::info("Process [loolwsd] finished.");
+    Log::info("Process finished.");
     return Application::EXIT_OK;
 }
 
diff --git a/loolwsd/QueueHandler.hpp b/loolwsd/QueueHandler.hpp
index 471c5b3..431279a 100644
--- a/loolwsd/QueueHandler.hpp
+++ b/loolwsd/QueueHandler.hpp
@@ -31,7 +31,7 @@ public:
     {
         Util::setThreadName(_name);
 
-        Log::debug("Thread [" + _name + "] started.");
+        Log::debug("Thread started.");
 
         try
         {
@@ -56,7 +56,7 @@ public:
             Log::error(std::string("QueueHandler::run: Exception: ") + exc.what());
         }
 
-        Log::debug("Thread [" + _name + "] finished.");
+        Log::debug("Thread finished.");
     }
 
 private:


More information about the Libreoffice-commits mailing list