common/Log.cpp |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 4d5bf74c9f6979f1498b3daa20e213e7dda27fc5
Author:     Tor Lillqvist <[email protected]>
AuthorDate: Fri Jul 10 11:33:14 2020 +0300
Commit:     Tor Lillqvist <[email protected]>
CommitDate: Fri Jul 10 10:56:57 2020 +0200

    Don't bother outputting the thread id in hex for iOS to log
    
    We output the informative name we give ourselves to the thread anyway
    which is much more useful.
    
    Change-Id: I74721cc0014fa657adfb6ecea05bcd7f846421a4
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98477
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Tor Lillqvist <[email protected]>

diff --git a/common/Log.cpp b/common/Log.cpp
index 0ae19df66..bc3637183 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -189,14 +189,15 @@ namespace Log
         // 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;
+
+        // Don't bother with the thread identifier either. We output the 
thread name which is much
+        // more useful anyway.
 #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
         const long osTid = Util::getThreadId();
         if (osTid > 99999)
         {
@@ -213,17 +214,10 @@ namespace Log
             to_ascii_fixed<5>(pos, osTid);
             pos += 5;
         }
-#elif defined IOS
-        uint64_t osTid;
-        pthread_threadid_np(nullptr, &osTid);
-        snprintf(pos, 32, "%#.05llx", osTid);
-        // Skip to end.
-        while (*pos)
-            pos++;
+        *pos++ = ' ';
 #endif
 
         // YYYY-MM-DD.
-        *pos++ = ' ';
         to_ascii_fixed<4>(pos, time.year());
         pos[4] = '-';
         pos += 5;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to