diff --git a/Classes/DialerView.m b/Classes/DialerView.m index 0de66f30d..c0aab3270 100644 --- a/Classes/DialerView.m +++ b/Classes/DialerView.m @@ -314,9 +314,9 @@ static UICompositeViewDescription *compositeDescription = nil; (debugEnabled ? NSLocalizedString(@"Disable logs", nil) : NSLocalizedString(@"Enable logs", nil)); [alertView addButtonWithTitle:actionLog block:^{ - // enable / disable - BOOL enableDebug = !debugEnabled; - [Log enableLogs:enableDebug]; + BOOL enabled = !debugEnabled; + [LinphoneManager.instance lpConfigSetBool:enabled forKey:@"debugenable_preference"]; + [Log enableLogs:enabled]; }]; [alertView show]; diff --git a/Classes/SettingsView.m b/Classes/SettingsView.m index 5973357f2..f56f7d5cc 100644 --- a/Classes/SettingsView.m +++ b/Classes/SettingsView.m @@ -415,6 +415,7 @@ static UICompositeViewDescription *compositeDescription = nil; [keys addObject:@"send_logs_button"]; [keys addObject:@"reset_logs_button"]; [Log enableLogs:debugEnabled]; + [LinphoneManager.instance lpConfigSetBool:debugEnabled forKey:@"debugenable_preference"]; } else if ([@"account_mandatory_advanced_preference" compare:notif.object] == NSOrderedSame) { removeFromHiddenKeys = [[notif.userInfo objectForKey:@"account_mandatory_advanced_preference"] boolValue]; for (NSString *key in settingsStore->dict) { diff --git a/Classes/Utils/Log.m b/Classes/Utils/Log.m index e05118de9..4a81cff07 100644 --- a/Classes/Utils/Log.m +++ b/Classes/Utils/Log.m @@ -56,7 +56,6 @@ } + (void)enableLogs:(BOOL)enabled { - [LinphoneManager.instance lpConfigSetBool:enabled forKey:@"debugenable_preference"]; linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler); if (enabled) { NSLog(@"Enabling debug logs");