Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed Dec 31, 2024
1 parent 7821c20 commit 5cbd7ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Monal/Classes/MLUDPLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -244,17 +244,18 @@ -(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;

//early return if deactivated
if(![[HelperTools defaultsDB] boolForKey: @"udpLoggerEnabled"])
return;

NSLog(@"direct=%@, logMessage.ml_isDirect=%@", direct, logMessage.ml_isDirect);
//ignore log messages already udp-logged as direct messages when handling queued messages
if(!direct && logMessage.ml_isDirect)
return;
Expand Down

0 comments on commit 5cbd7ca

Please sign in to comment.