mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
Add ability to disable log / verbose output to remote consoles (issue #6524 reported by mavetju)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
14
cli.c
14
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 },
|
||||
|
||||
Reference in New Issue
Block a user