aboutsummaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-26 19:48:17 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-26 19:48:17 +0000
commit25f8c236a419b3afed194e4f2067cba96ffdc3a3 (patch)
tree3acc5d1eb4bfcc4c9e20f880d286e146afe1551c /cli.c
parent9e3edfdd277b77aeddd0987940e7a6e1f3c211bc (diff)
Add ability to disable log / verbose output to remote consoles (issue #6524 reported by mavetju)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@30603 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rw-r--r--cli.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/cli.c b/cli.c
index 491472231..dcdb05716 100644
--- a/cli.c
+++ b/cli.c
@@ -114,6 +114,11 @@ static char set_debug_help[] =
" no messages should be displayed. Equivalent to -d[d[d...]]\n"
" on startup.\n";
+static char logger_mute_help[] =
+"Usage: logger mute\n"
+" Disables logging output to the current console, making it possible to\n"
+" gather information without being disturbed by scrolling lines.\n";
+
static char softhangup_help[] =
"Usage: soft hangup <channel>\n"
" Request that a channel be hung up. The hangup takes effect\n"
@@ -213,6 +218,14 @@ static int handle_set_debug(int fd, int argc, char *argv[])
return RESULT_SUCCESS;
}
+static int handle_logger_mute(int fd, int argc, char *argv[])
+{
+ if (argc != 2)
+ return RESULT_SHOWUSAGE;
+ ast_console_mute(fd);
+ return RESULT_SUCCESS;
+}
+
static int handle_unload(int fd, int argc, char *argv[])
{
int x;
@@ -919,6 +932,7 @@ static struct ast_cli_entry builtins[] = {
{ { "reload", NULL }, handle_reload, "Reload configuration", reload_help, complete_mod_2 },
{ { "set", "debug", NULL }, handle_set_debug, "Set level of debug chattiness", set_debug_help },
{ { "set", "verbose", NULL }, handle_set_verbose, "Set level of verboseness", set_verbose_help },
+ { { "logger", "mute", NULL }, handle_logger_mute, "Disable logging output to a console", logger_mute_help },
{ { "show", "channel", NULL }, handle_showchan, "Display information on a specific channel", showchan_help, complete_ch_3 },
{ { "show", "channels", NULL }, handle_chanlist, "Display information on channels", chanlist_help, complete_show_channels },
{ { "show", "modules", NULL }, handle_modlist, "List modules and info", modlist_help },