@@ -277,9 +277,7 @@ void logException(NSException* exception)
277277 NSString * prefix = @" CRASH" ;
278278#endif
279279 // log error and flush all logs
280- [DDLog flushLog ];
281280 DDLogError (@" *****************\n %@ (%@ ): %@ \n UserInfo: %@ \n Stack Trace: %@ " , prefix, [exception name ], [exception reason ], [exception userInfo ], [exception callStackSymbols ]);
282- [DDLog flushLog ];
283281 [HelperTools flushLogsWithTimeout: 0.250 ];
284282}
285283
@@ -2232,6 +2230,8 @@ +(void) configureXcodeLogging
22322230
22332231+(void ) configureLogging
22342232{
2233+ NSError * error;
2234+
22352235 // network logger (start as early as possible)
22362236 MLUDPLogger* udpLogger = [MLUDPLogger new ];
22372237 [DDLog addLogger: udpLogger];
@@ -2245,10 +2245,17 @@ +(void) configureLogging
22452245 printf (" stdout redirection complete..." );
22462246
22472247 // redirect apple system logs, too
2248- #pragma clang diagnostic push
2249- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
2250- [DDASLLogCapture start ];
2251- #pragma clang diagnostic pop
2248+ /*
2249+ OSLogStore* osLogStore = [OSLogStore storeWithScope:OSLogStoreCurrentProcessIdentifier error:&error];
2250+ if(error)
2251+ DDLogError(@"Failed to open os log store: %@", error);
2252+ else
2253+ {
2254+ dispatch_async(, ^{
2255+ [osLogStore entriesEnumeratorAndReturnError:&error];
2256+ });
2257+ }
2258+ */
22522259
22532260 NSString * containerUrl = [[HelperTools getContainerURLForPathComponents: @[]] path ];
22542261 DDLogInfo (@" Logfile dir: %@ " , containerUrl);
@@ -2265,7 +2272,6 @@ +(void) configureLogging
22652272
22662273 DDLogDebug (@" Sorted logfiles: %@ " , [logFileManager sortedLogFileInfos ]);
22672274 DDLogDebug (@" Current logfile: %@ " , self.fileLogger .currentLogFileInfo .filePath );
2268- NSError * error;
22692275 NSDictionary * attrs = [[NSFileManager defaultManager ] attributesOfItemAtPath: self .fileLogger.currentLogFileInfo.filePath error: &error];
22702276 if (error)
22712277 DDLogError (@" File attributes error: %@ " , error);
0 commit comments