From 88aa81a5ffa6abd46f53731db02f53f503a41318 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Tue, 21 Oct 2014 10:58:52 +0200 Subject: [PATCH] Enable log collection before creating the core to get its traces too --- Classes/LinphoneManager.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 80aea349b..7c76a02af 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1332,14 +1332,15 @@ static BOOL libStarted = FALSE; ortp_set_log_level_mask(ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL); } + /*must be done before creating linphone core to get its traces too*/ + linphone_core_set_log_collection_path([[LinphoneManager cacheDirectory] UTF8String]); + linphone_core_enable_log_collection([self lpConfigBoolForKey:@"enable_log_collect"]); theLinphoneCore = linphone_core_new_with_config (&linphonec_vtable ,configDb ,self /* user_data */); - linphone_core_set_log_collection_path([[LinphoneManager cacheDirectory] UTF8String]); - linphone_core_enable_log_collection([self lpConfigBoolForKey:@"enable_log_collect"]); /* set the CA file no matter what, since the remote provisioning could be hitting an HTTPS server */ const char* lRootCa = [[LinphoneManager bundleFile:@"rootca.pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]];