aboutsummaryrefslogtreecommitdiffstats
path: root/main/logger.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-18 19:54:18 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-18 19:54:18 +0000
commit5aacb6a82d4cf625774fa1ea39ca193a3be73b35 (patch)
treecf63baa167f81c95d3dbf417f83681851decad80 /main/logger.c
parent4de5810a0530bca0665eadcfb06ef06fd2e86758 (diff)
merge qwell's CLI verbification work
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r--main/logger.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/main/logger.c b/main/logger.c
index e0f88a10e..c9dbf4dea 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -554,23 +554,27 @@ static char logger_rotate_help[] =
" Rotates and Reopens the log files.\n";
static char logger_show_channels_help[] =
-"Usage: logger show channels\n"
-" Show configured logger channels.\n";
+"Usage: logger list channels\n"
+" List configured logger channels.\n";
-static struct ast_cli_entry logger_show_channels_cli =
- { { "logger", "show", "channels", NULL },
+static struct ast_cli_entry cli_logger_show_channels_deprecated = {
+ { "logger", "show", "channels", NULL },
+ handle_logger_show_channels, NULL,
+ NULL };
+
+static struct ast_cli_entry cli_logger[] = {
+ { { "logger", "list", "channels", NULL },
handle_logger_show_channels, "List configured log channels",
- logger_show_channels_help };
+ logger_show_channels_help, NULL, &cli_logger_show_channels_deprecated },
-static struct ast_cli_entry reload_logger_cli =
{ { "logger", "reload", NULL },
handle_logger_reload, "Reopens the log files",
- logger_reload_help };
+ logger_reload_help },
-static struct ast_cli_entry rotate_logger_cli =
{ { "logger", "rotate", NULL },
handle_logger_rotate, "Rotates and reopens the log files",
- logger_rotate_help };
+ logger_rotate_help },
+};
static int handle_SIGXFSZ(int sig)
{
@@ -587,10 +591,8 @@ int init_logger(void)
/* auto rotate if sig SIGXFSZ comes a-knockin */
(void) signal(SIGXFSZ,(void *) handle_SIGXFSZ);
- /* register the relaod logger cli command */
- ast_cli_register(&reload_logger_cli);
- ast_cli_register(&rotate_logger_cli);
- ast_cli_register(&logger_show_channels_cli);
+ /* register the logger cli commands */
+ ast_cli_register_multiple(cli_logger, sizeof(cli_logger) / sizeof(struct ast_cli_entry));
mkdir((char *)ast_config_AST_LOG_DIR, 0755);