mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 14:48:07 +00:00
linphonecore.c: add linphone_core_set_log_level_mask and deprecate linphone_core_set_log_level since it's actually a misname of the first function
This commit is contained in:
parent
e05d5e1787
commit
ba701257fe
3 changed files with 14 additions and 4 deletions
|
|
@ -171,6 +171,10 @@ void linphone_core_set_log_file(FILE *file) {
|
|||
}
|
||||
|
||||
void linphone_core_set_log_level(OrtpLogLevel loglevel) {
|
||||
linphone_core_set_log_level_mask(loglevel);
|
||||
}
|
||||
|
||||
void linphone_core_set_log_level_mask(OrtpLogLevel loglevel) {
|
||||
ortp_set_log_level_mask(loglevel);
|
||||
if (loglevel == 0) {
|
||||
sal_disable_logs();
|
||||
|
|
|
|||
|
|
@ -1166,7 +1166,7 @@ LINPHONE_PUBLIC const char *linphone_proxy_config_get_custom_header(LinphoneProx
|
|||
/**
|
||||
* Set the value of a custom header sent to the server in REGISTERs request.
|
||||
* @param cfg the proxy config object
|
||||
* @param header_name the header name
|
||||
* @param header_name the header name
|
||||
* @param header_value the header's value
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_set_custom_header(LinphoneProxyConfig *cfg, const char *header_name, const char *header_value);
|
||||
|
|
@ -2072,6 +2072,12 @@ LINPHONE_PUBLIC void linphone_core_set_log_handler(OrtpLogFunc logfunc);
|
|||
* @param file A pointer to the FILE structure of the file to write to.
|
||||
*/
|
||||
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..
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_core_set_log_level(OrtpLogLevel loglevel);
|
||||
/**
|
||||
* Define the log level.
|
||||
*
|
||||
|
|
@ -2082,7 +2088,7 @@ LINPHONE_PUBLIC void linphone_core_set_log_file(FILE *file);
|
|||
*
|
||||
* @param loglevel A bitmask of the log levels to set.
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_set_log_level(OrtpLogLevel loglevel);
|
||||
LINPHONE_PUBLIC void linphone_core_set_log_level_mask(OrtpLogLevel loglevel);
|
||||
LINPHONE_PUBLIC void linphone_core_enable_logs(FILE *file);
|
||||
LINPHONE_PUBLIC void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc);
|
||||
LINPHONE_PUBLIC void linphone_core_disable_logs(void);
|
||||
|
|
|
|||
|
|
@ -186,9 +186,9 @@ int main (int argc, char *argv[])
|
|||
|
||||
for(i = 1; i < argc; ++i) {
|
||||
if (strcmp(argv[i], "--verbose") == 0) {
|
||||
linphone_core_set_log_level(ORTP_MESSAGE);
|
||||
linphone_core_set_log_level_mask(ORTP_MESSAGE);
|
||||
} else if (strcmp(argv[i], "--silent") == 0) {
|
||||
linphone_core_set_log_level(ORTP_FATAL);
|
||||
linphone_core_set_log_level_mask(ORTP_FATAL);
|
||||
} else if (strcmp(argv[i],"--log-file")==0){
|
||||
CHECK_ARG("--log-file", ++i, argc);
|
||||
log_file=fopen(argv[i],"w");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue