mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
Really initialize queue log
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
8
logger.c
8
logger.c
@@ -323,6 +323,8 @@ int reload_logger(int rotate)
|
|||||||
|
|
||||||
ast_mutex_unlock(&loglock);
|
ast_mutex_unlock(&loglock);
|
||||||
|
|
||||||
|
queue_log_init();
|
||||||
|
|
||||||
if (eventlog) {
|
if (eventlog) {
|
||||||
init_logger_chain();
|
init_logger_chain();
|
||||||
ast_log(LOG_EVENT, "Restarted Asterisk Event Logger\n");
|
ast_log(LOG_EVENT, "Restarted Asterisk Event Logger\n");
|
||||||
@@ -331,7 +333,6 @@ int reload_logger(int rotate)
|
|||||||
return 0;
|
return 0;
|
||||||
} else
|
} else
|
||||||
ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno));
|
ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno));
|
||||||
queue_log_init();
|
|
||||||
init_logger_chain();
|
init_logger_chain();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -401,6 +402,9 @@ int init_logger(void)
|
|||||||
ast_cli_register(&reload_logger_cli);
|
ast_cli_register(&reload_logger_cli);
|
||||||
ast_cli_register(&rotate_logger_cli);
|
ast_cli_register(&rotate_logger_cli);
|
||||||
|
|
||||||
|
/* initialize queue logger */
|
||||||
|
queue_log_init();
|
||||||
|
|
||||||
/* create the eventlog */
|
/* create the eventlog */
|
||||||
mkdir((char *)ast_config_AST_LOG_DIR, 0755);
|
mkdir((char *)ast_config_AST_LOG_DIR, 0755);
|
||||||
snprintf(tmp, sizeof(tmp), "%s/%s", (char *)ast_config_AST_LOG_DIR, EVENTLOG);
|
snprintf(tmp, sizeof(tmp), "%s/%s", (char *)ast_config_AST_LOG_DIR, EVENTLOG);
|
||||||
@@ -418,8 +422,6 @@ int init_logger(void)
|
|||||||
|
|
||||||
/* create log channels */
|
/* create log channels */
|
||||||
init_logger_chain();
|
init_logger_chain();
|
||||||
/* initialize queue logger */
|
|
||||||
queue_log_init();
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user