[Libreoffice-commits] online.git: common/Log.cpp common/Log.hpp

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Sat Mar 14 13:23:47 UTC 2020


 common/Log.cpp |   12 ++++--------
 common/Log.hpp |    7 +++++--
 2 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 1339b36575b28468ab5ef293a381c5f91eb15b76
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Thu Mar 12 11:06:40 2020 -0400
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sat Mar 14 14:23:27 2020 +0100

    wsd: define Log::shutdown for Mobile to avoid special casing at call sites
    
    Change-Id: I9125df562c96b3671cb47200a36aae145cf29259
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90423
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/common/Log.cpp b/common/Log.cpp
index ef2b03038..d96bd3f82 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -218,24 +218,20 @@ namespace Log
                        : Poco::Logger::get(Source.getInited() ? Source.getName() : std::string());
     }
 
-#if !MOBILEAPP
     void shutdown()
     {
-        Poco::Logger::shutdown();
+#if !MOBILEAPP
         IsShutdown = true;
 
+        Poco::Logger::shutdown();
+
         // Flush
         std::flush(std::cout);
         fflush(stdout);
         std::flush(std::cerr);
         fflush(stderr);
-    }
-
-    bool isShutdownCalled()
-    {
-        return IsShutdown;
-    }
 #endif
+    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/common/Log.hpp b/common/Log.hpp
index 35aaa0834..aa83bc171 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -56,11 +56,14 @@ namespace Log
     /// Returns the underlying logging system.
     Poco::Logger& logger();
 
-#if !MOBILEAPP
     /// Shutdown and release the logging system.
     void shutdown();
+
+#if !MOBILEAPP
+    extern bool IsShutdown;
+
     /// Was static shutdown() called? If so, producing more logs should be avoided.
-    bool isShutdownCalled();
+    inline bool isShutdownCalled() { return IsShutdown; }
 #else
     constexpr bool isShutdownCalled() { return false; }
 #endif


More information about the Libreoffice-commits mailing list