[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - 2 commits - common/Log.cpp ios/Mobile
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue May 14 11:44:37 UTC 2019
common/Log.cpp | 16 ++++++++++++----
ios/Mobile/AppDelegate.mm | 2 ++
2 files changed, 14 insertions(+), 4 deletions(-)
New commits:
commit 1402a829571136b329d66202c41ff0500d779579
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue May 14 13:48:58 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue May 14 14:42:27 2019 +0300
Use same kind of thread id as Xcode and osl_getThreadIdentifier() on iOS
Reduce the number of different kinds of identifiers for threads that
are displayed in various places. Use the number that you get with
pthread_threadid_np(), in hex, which is the same that Xcode (i.e.
lldb) displays in its "thread list" command. It also is the same
number that osl_getThreadIdentifier() returns.
Change-Id: I0c14ad99badd7e742d15b7d1f37037fa66c892b4
diff --git a/common/Log.cpp b/common/Log.cpp
index 51c100522..4441eb785 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -115,12 +115,9 @@ namespace Log
char* prefix(char* buffer, const std::size_t len, const char* level)
{
const char *threadName = Util::getThreadName();
+ Poco::DateTime time;
#ifdef __linux
const long osTid = Util::getThreadId();
-#elif defined IOS
- const auto osTid = pthread_mach_thread_np(pthread_self());
-#endif
- Poco::DateTime time;
snprintf(buffer, len, "%s-%.05lu %.4u-%.2u-%.2u %.2u:%.2u:%.2u.%.6u [ %s ] %s ",
(Source.getInited() ? Source.getId().c_str() : "<shutdown>"),
osTid,
@@ -128,6 +125,17 @@ namespace Log
time.hour(), time.minute(), time.second(),
time.millisecond() * 1000 + time.microsecond(),
threadName, level);
+#elif defined IOS
+ uint64_t osTid;
+ pthread_threadid_np(nullptr, &osTid);
+ snprintf(buffer, len, "%s-%#.05llx %.4u-%.2u-%.2u %.2u:%.2u:%.2u.%.6u [ %s ] %s ",
+ (Source.getInited() ? Source.getId().c_str() : "<shutdown>"),
+ osTid,
+ time.year(), time.month(), time.day(),
+ time.hour(), time.minute(), time.second(),
+ time.millisecond() * 1000 + time.microsecond(),
+ threadName, level);
+#endif
return buffer;
}
commit 76e7c1c4d83e103a4671d8c58b3fc1bc276af9de
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Apr 24 13:24:53 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue May 14 13:54:56 2019 +0300
Turn on Unipoll for the iOS app, too
Change-Id: Ib0b7ac53b7c936e75446004c4581ace415b1dd5c
diff --git a/ios/Mobile/AppDelegate.mm b/ios/Mobile/AppDelegate.mm
index b9836f5d4..5cbc51da3 100644
--- a/ios/Mobile/AppDelegate.mm
+++ b/ios/Mobile/AppDelegate.mm
@@ -181,6 +181,8 @@ static void updateTemplates(NSData *data, NSURLResponse *response)
if (!trace)
trace = strdup("warning");
+ setenv("SAL_LOK_OPTIONS", "unipoll", 0);
+
Log::initialize("Mobile", trace, false, false, {});
Util::setThreadName("main");
More information about the Libreoffice-commits
mailing list