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

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 2 19:18:17 UTC 2020


 common/Log.cpp |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit f1b13c7e777976976caad6ab864e18fc95db0a59
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Jul 2 22:15:08 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Jul 2 22:16:53 2020 +0300

    Drop the fixed prefix ("Mobile-") from log output in the iOS app
    
    There is just one process in the app so logging its name which always
    is the same is pointless.
    
    Change-Id: I89dbabc26457a142d35bf748981edb670cba4732

diff --git a/common/Log.cpp b/common/Log.cpp
index e001980af..0ae19df66 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -185,9 +185,15 @@ namespace Log
 
     char* prefix(const Poco::DateTime& time, char* buffer, const char* level)
     {
+#ifdef IOS
+        // Don't bother with the "Source" which would be just "Mobile" always and non-informative as
+        // there is just one process in the app anyway.
+        char *pos = buffer;
+#else
         // Note that snprintf is deemed signal-safe in most common implementations.
         char* pos = strcopy((Source.getInited() ? Source.getId().c_str() : "<shutdown>"), buffer);
         *pos++ = '-';
+#endif
 
         // Thread ID.
 #ifdef __linux


More information about the Libreoffice-commits mailing list