From 70e0ee296d5e0ca320453c75cf7ddabdf1805b8b Mon Sep 17 00:00:00 2001 From: Thilo Molitor Date: Tue, 31 Dec 2024 13:59:06 +0100 Subject: [PATCH] debug --- Monal/Classes/MLUDPLogger.m | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Monal/Classes/MLUDPLogger.m b/Monal/Classes/MLUDPLogger.m index 75ff78b0d..060a19a0f 100644 --- a/Monal/Classes/MLUDPLogger.m +++ b/Monal/Classes/MLUDPLogger.m @@ -87,7 +87,7 @@ +(void) directlyWriteLogMessage:(DDLogMessage*) logMessage [[self class] logError:@"Ignoring call to directlySyncWriteLogMessage: _self still nil!"]; return; } - return [_self realLogMessage:logMessage wasDirect:YES]; + return [_self realLogMessage:logMessage isDirect:YES]; } -(void) dealloc @@ -244,10 +244,10 @@ -(void) createConnectionIfNeeded -(void) logMessage:(DDLogMessage*) logMessage { - return [self realLogMessage:logMessage wasDirect:NO]; + return [self realLogMessage:logMessage isDirect:NO]; } --(void) realLogMessage:(DDLogMessage*) logMessage wasDirect:(BOOL) direct +-(void) realLogMessage:(DDLogMessage*) logMessage isDirect:(BOOL) direct { static uint64_t counter = 0; @@ -259,6 +259,22 @@ -(void) realLogMessage:(DDLogMessage*) logMessage wasDirect:(BOOL) direct if(!direct && logMessage.ml_isDirect) return; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + logMessage = [[DDLogMessage alloc] + initWithFormat:logMessage.messageFormat + formatted:[NSString stringWithFormat:@"direct=%@, logMessage.ml_isDirect=%@ ~~~ %@", bool2str(direct), bool2str(logMessage.ml_isDirect), logMessage.message] + level:logMessage.level + flag:logMessage.flag + context:logMessage.context + file:logMessage.file + function:logMessage.function + line:logMessage.line + tag:logMessage.tag + options:logMessage.options + timestamp:logMessage.timestamp]; +#pragma clang diagnostic pop + NSError* error = nil; NSData* rawData = [HelperTools convertLogmessageToJsonData:logMessage counter:&counter andError:&error]; if(error != nil || rawData == nil)