@@ -277,9 +277,7 @@ void logException(NSException* exception)
277
277
NSString * prefix = @" CRASH" ;
278
278
#endif
279
279
// log error and flush all logs
280
- [DDLog flushLog ];
281
280
DDLogError (@" *****************\n %@ (%@ ): %@ \n UserInfo: %@ \n Stack Trace: %@ " , prefix, [exception name ], [exception reason ], [exception userInfo ], [exception callStackSymbols ]);
282
- [DDLog flushLog ];
283
281
[HelperTools flushLogsWithTimeout: 0.250 ];
284
282
}
285
283
@@ -2232,6 +2230,8 @@ +(void) configureXcodeLogging
2232
2230
2233
2231
+(void ) configureLogging
2234
2232
{
2233
+ NSError * error;
2234
+
2235
2235
// network logger (start as early as possible)
2236
2236
MLUDPLogger* udpLogger = [MLUDPLogger new ];
2237
2237
[DDLog addLogger: udpLogger];
@@ -2245,10 +2245,17 @@ +(void) configureLogging
2245
2245
printf (" stdout redirection complete..." );
2246
2246
2247
2247
// 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
+ */
2252
2259
2253
2260
NSString * containerUrl = [[HelperTools getContainerURLForPathComponents: @[]] path ];
2254
2261
DDLogInfo (@" Logfile dir: %@ " , containerUrl);
@@ -2265,7 +2272,6 @@ +(void) configureLogging
2265
2272
2266
2273
DDLogDebug (@" Sorted logfiles: %@ " , [logFileManager sortedLogFileInfos ]);
2267
2274
DDLogDebug (@" Current logfile: %@ " , self.fileLogger .currentLogFileInfo .filePath );
2268
- NSError * error;
2269
2275
NSDictionary * attrs = [[NSFileManager defaultManager ] attributesOfItemAtPath: self .fileLogger.currentLogFileInfo.filePath error: &error];
2270
2276
if (error)
2271
2277
DDLogError (@" File attributes error: %@ " , error);
0 commit comments