mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
linphonecore: fix linphone_core_set_log_level behavior (eg. take argument not as bit mask but minimum verbosity
This commit is contained in:
parent
794ccbaad5
commit
87d2c1a647
2 changed files with 22 additions and 4 deletions
|
|
@ -171,7 +171,24 @@ void linphone_core_set_log_file(FILE *file) {
|
|||
}
|
||||
|
||||
void linphone_core_set_log_level(OrtpLogLevel loglevel) {
|
||||
linphone_core_set_log_level_mask(loglevel);
|
||||
OrtpLogLevel mask = loglevel;
|
||||
switch (loglevel) {
|
||||
case ORTP_TRACE:
|
||||
case ORTP_DEBUG:
|
||||
mask |= ORTP_DEBUG;
|
||||
case ORTP_MESSAGE:
|
||||
mask |= ORTP_MESSAGE;
|
||||
case ORTP_WARNING:
|
||||
mask |= ORTP_WARNING;
|
||||
case ORTP_ERROR:
|
||||
mask |= ORTP_ERROR;
|
||||
case ORTP_FATAL:
|
||||
mask |= ORTP_FATAL;
|
||||
break;
|
||||
case ORTP_LOGLEV_END:
|
||||
break;
|
||||
}
|
||||
linphone_core_set_log_level_mask(mask);
|
||||
}
|
||||
|
||||
void linphone_core_set_log_level_mask(OrtpLogLevel loglevel) {
|
||||
|
|
|
|||
|
|
@ -2390,12 +2390,13 @@ LINPHONE_PUBLIC void linphone_core_set_log_handler(OrtpLogFunc logfunc);
|
|||
LINPHONE_PUBLIC void linphone_core_set_log_file(FILE *file);
|
||||
|
||||
/**
|
||||
* @deprecated Use #linphone_core_set_log_level_mask instead, which is exactly the
|
||||
* same function..
|
||||
* @deprecated Define the log level.
|
||||
*
|
||||
* @param loglevel Minimum level for logging messages.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_set_log_level(OrtpLogLevel loglevel);
|
||||
/**
|
||||
* Define the log level.
|
||||
* Define the log level using mask.
|
||||
*
|
||||
* @ingroup misc
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue