[asterisk-commits] oej: trunk r91384 - in /trunk: ./ include/asterisk/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Dec 6 08:23:13 CST 2007
Author: oej
Date: Thu Dec 6 08:23:12 2007
New Revision: 91384
URL: http://svn.digium.com/view/asterisk?view=rev&rev=91384
Log:
Merged revisions 91366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r91366 | oej | 2007-12-06 13:54:11 +0100 (Tor, 06 Dec 2007) | 4 lines
Make sure logger is reloaded at general reload in the cli.
(Discovered during Asterisk training in Portugal)
........
Modified:
trunk/ (props changed)
trunk/include/asterisk/logger.h
trunk/main/loader.c
trunk/main/logger.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/include/asterisk/logger.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/logger.h?view=diff&rev=91384&r1=91383&r2=91384
==============================================================================
--- trunk/include/asterisk/logger.h (original)
+++ trunk/include/asterisk/logger.h Thu Dec 6 08:23:12 2007
@@ -62,6 +62,9 @@
__attribute__ ((format (printf, 5, 6)));
void ast_backtrace(void);
+
+/*! \brief Reload logger without rotating log files */
+int logger_reload(void);
void ast_queue_log(const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt, ...)
__attribute__ ((format (printf, 5, 6)));
Modified: trunk/main/loader.c
URL: http://svn.digium.com/view/asterisk/trunk/main/loader.c?view=diff&rev=91384&r1=91383&r2=91384
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Thu Dec 6 08:23:12 2007
@@ -251,6 +251,7 @@
{ "manager", reload_manager },
{ "rtp", ast_rtp_reload },
{ "http", ast_http_reload },
+ { "logger", logger_reload },
{ NULL, NULL }
};
Modified: trunk/main/logger.c
URL: http://svn.digium.com/view/asterisk/trunk/main/logger.c?view=diff&rev=91384&r1=91383&r2=91384
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Thu Dec 6 08:23:12 2007
@@ -616,6 +616,15 @@
return res;
}
+/*! \brief Reload the logger module without rotating log files (also used from loader.c during
+ a full Asterisk reload) */
+int logger_reload(void)
+{
+ if(reload_logger(0))
+ return RESULT_FAILURE;
+ return RESULT_SUCCESS;
+}
+
static char *handle_logger_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
switch (cmd) {
@@ -631,8 +640,8 @@
if (reload_logger(0)) {
ast_cli(a->fd, "Failed to reload the logger\n");
return CLI_FAILURE;
- } else
- return CLI_SUCCESS;
+ }
+ return CLI_SUCCESS;
}
static char *handle_logger_rotate(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
@@ -650,8 +659,8 @@
if (reload_logger(1)) {
ast_cli(a->fd, "Failed to reload the logger and rotate log files\n");
return CLI_FAILURE;
- } else
- return CLI_SUCCESS;
+ }
+ return CLI_SUCCESS;
}
/*! \brief CLI command to show logging system configuration */
More information about the asterisk-commits
mailing list