mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Make sure default log handler is only removed when relevant
This commit is contained in:
parent
eadc5ae6b8
commit
40dc0730ac
1 changed files with 6 additions and 5 deletions
|
|
@ -133,11 +133,6 @@ static LinphoneLoggingService *_linphone_logging_service_new(void) {
|
|||
service->cbs = _linphone_logging_service_cbs_new();
|
||||
bctbx_add_log_handler(service->log_handler);
|
||||
|
||||
/* We need to set the legacy log handler to NULL here
|
||||
because LinphoneCore have a default log handler that dump
|
||||
all messages into the standard output. */
|
||||
_linphone_core_set_log_handler(NULL);
|
||||
|
||||
return service;
|
||||
}
|
||||
|
||||
|
|
@ -241,6 +236,12 @@ void linphone_logging_service_cbs_unref(LinphoneLoggingServiceCbs *cbs) {
|
|||
}
|
||||
|
||||
void linphone_logging_service_cbs_set_log_message_written(LinphoneLoggingServiceCbs *cbs, LinphoneLoggingServiceCbsLogMessageWrittenCb cb) {
|
||||
|
||||
/* We need to set the legacy log handler to NULL here
|
||||
because LinphoneCore have a default log handler that dump
|
||||
all messages into the standard output. */
|
||||
/*this function is moved here to make sure default log handler is only removed when user defined logging cbs is set*/
|
||||
_linphone_core_set_log_handler(NULL);
|
||||
cbs->message_event_cb = cb;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue