Make sure SULog delivers messages synchronously

This commit is contained in:
Zorg committed 2016-06-21 19:04:01 -04:00
1 parent b1606648cf
commit 1392190d47
1 file changed
+2 -1
+2 -1
View File
@@ -43,7 +43,8 @@ void SULog(NSString *format, ...)
NSString *logMessage = [[NSString alloc] initWithFormat:format arguments:ap];
va_end(ap);
dispatch_async(queue, ^{
// Make sure we do not async, because if we async, the log may not be delivered deterministically
dispatch_sync(queue, ^{
aslmsg message = asl_new(ASL_TYPE_MSG);
if (message == NULL) {
return;