common/Log.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit bc6a5123213d3986e394b38d532232b411c0ea63 Author: Tor Lillqvist <[email protected]> AuthorDate: Thu Jul 2 22:00:34 2020 +0300 Commit: Tor Lillqvist <[email protected]> CommitDate: Thu Sep 24 09:40:51 2020 +0300 Fix iOS logging breakage after 287b70a50408d260f3c6c0d5306c081a40eea280 This: while (*pos++); leaves pos pointing to the char *after* the first null char. Thus we lost the timestamp, thread name, and message log level. The log output ended up loooking like: Mobile-0x42a805To JS: loolserver { "Version": "master..", "Hash": "1e3b28b0", "Protocol": "0.1", "Id": "e42d1a33" }| CODocument.mm:115 with no space between the thread id and the message, while what we expect is: Mobile-0x42be9e 2020-07-02 18:59:30.490298 [ main ] INF To JS: loolserver { "Version": "master..", "Hash": "1e3b28b0", "Protocol": "0.1", "Id": "46ebf726" }| CODocument.mm:115 As such it is not necessary to show "Mobile" (the name of the process's main program) in the log messages. There is just one process. Will remove that in a later commit. Change-Id: I55c4a82f2b34e3b9e70e86cc7af8ea42a3108695 diff --git a/common/Log.cpp b/common/Log.cpp index feabf0216..e001980af 100644 --- a/common/Log.cpp +++ b/common/Log.cpp @@ -211,7 +211,9 @@ namespace Log uint64_t osTid; pthread_threadid_np(nullptr, &osTid); snprintf(pos, 32, "%#.05llx", osTid); - while (*pos++); // Skip to end. + // Skip to end. + while (*pos) + pos++; #endif // YYYY-MM-DD. _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
