diff --git a/RadarSDK/Radar.m b/RadarSDK/Radar.m index 99d26538..af634c92 100644 --- a/RadarSDK/Radar.m +++ b/RadarSDK/Radar.m @@ -1295,9 +1295,9 @@ - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; } -+ (BOOL)isTestKey { ++ (BOOL)canFlushLogs { NSString *publishableKey = [RadarSettings publishableKey]; - if ([publishableKey hasPrefix:@"prj_test_pk"] || [publishableKey hasPrefix:@"org_test_pk"] || [RadarSettings userDebug]) { + if ([publishableKey hasPrefix:@"prj_test_pk"] || [publishableKey hasPrefix:@"org_test_pk"] || [RadarSettings userDebug] || ([RadarSettings sdkConfiguration].logLevel && [RadarSettings sdkConfiguration].logLevel != RadarLogLevelNone)) { return YES; } return NO; @@ -1308,7 +1308,7 @@ + (void)sendLog:(RadarLogLevel)level type:(RadarLogType)type message:(NSString * } + (void)flushLogs { - if (![self isTestKey]) { + if (![self canFlushLogs]) { return; }