-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
The function is on coturn/src/apps/common/ns_turn_utils.c
static void set_rtpfile(void)
{
if(to_reset_log_file) {
printf("%s: resetting the log file\n",__FUNCTION__);
reset_rtpprintf();
to_reset_log_file = 0;
}
if(to_syslog) {
return;
} else if (!_rtpfile) {
signal(SIGHUP, sighup_callback_handler);
if(log_fn_base[0]) {
if(!strcmp(log_fn_base,"syslog")) {
_rtpfile = stdout;
to_syslog = 1; //write here
} else if(!strcmp(log_fn_base,"stdout")|| !strcmp(log_fn_base,"-")) {
_rtpfile = stdout;
no_stdout_log = 1;
} else {
set_log_file_name(log_fn_base,log_fn);
_rtpfile = fopen(log_fn, "a");
if(_rtpfile)
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "log file opened: %s\n", log_fn);
}
if (!_rtpfile) {
fprintf(stderr,"ERROR: Cannot open log file for writing: %s\n",log_fn);
} else {
return;
}
}
}
}
The function is on coturn/src/apps/common/ns_turn_utils.c.
void rollover_logfile(void)
{
if(to_syslog || !(log_fn[0])) //read here
return;
....;
}
Reactions are currently unavailable