From 09a533a8a97396759c901b2753cd4230417b11ab Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 30 Aug 2017 14:01:04 +0200 Subject: [PATCH] make sure to also register loghandler at SAL level --- coreapi/linphonecore.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 343dffad6..fe2bfc901 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -462,8 +462,10 @@ void linphone_core_set_log_handler(OrtpLogFunc logfunc) { if (ortp_get_log_handler() == linphone_core_log_collection_handler) { ms_message("There is already a log collection handler, keep it"); liblinphone_log_func = logfunc; - } else + } else { ortp_set_log_handler(logfunc); + sal_set_log_handler(logfunc); + } } void linphone_core_set_log_file(FILE *file) { @@ -695,8 +697,10 @@ void linphone_core_enable_log_collection(LinphoneLogCollectionState state) { liblinphone_log_func = ortp_get_log_handler(); } ortp_set_log_handler(linphone_core_log_collection_handler); + sal_set_log_handler(linphone_core_log_collection_handler); } else { ortp_set_log_handler(liblinphone_log_func); + sal_set_log_handler(liblinphone_log_func); } }