提交 e1be9733 authored 作者: Mike Jerris's avatar Mike Jerris

FS-10210: [mod_console] add support for uuid config param and 'console uuid' api command

上级 33a059ec
...@@ -280,6 +280,7 @@ SWITCH_STANDARD_API(console_api_function) ...@@ -280,6 +280,7 @@ SWITCH_STANDARD_API(console_api_function)
"--------------------------------------------------------------------------------\n" "--------------------------------------------------------------------------------\n"
"console help\n" "console help\n"
"console loglevel [[0-7] | <loglevel_string>]\n" "console loglevel [[0-7] | <loglevel_string>]\n"
"console uuid [on|off|toggle]\n"
"console colorize [on|off|toggle]\n" "--------------------------------------------------------------------------------\n"; "console colorize [on|off|toggle]\n" "--------------------------------------------------------------------------------\n";
const char *loglevel_usage_string = "USAGE:\n" const char *loglevel_usage_string = "USAGE:\n"
"--------------------------------------------------------------------------------\n" "--------------------------------------------------------------------------------\n"
...@@ -349,6 +350,20 @@ SWITCH_STANDARD_API(console_api_function) ...@@ -349,6 +350,20 @@ SWITCH_STANDARD_API(console_api_function)
} }
stream->write_function(stream, "+OK console color %s\n", COLORIZE ? "enabled" : "disabled"); stream->write_function(stream, "+OK console color %s\n", COLORIZE ? "enabled" : "disabled");
} else if (!strcasecmp(argv[0], "uuid")) {
if (argc > 1) {
if (!strcasecmp(argv[1], "toggle")) {
if (log_uuid) {
log_uuid = SWITCH_FALSE;
} else {
log_uuid = SWITCH_TRUE;
}
} else {
log_uuid = switch_true(argv[1]);
}
}
stream->write_function(stream, "+OK console uuid %s\n", log_uuid ? "enabled" : "disabled");
} else { /* if (!strcasecmp(argv[0], "help")) { */ } else { /* if (!strcasecmp(argv[0], "help")) { */
stream->write_function(stream, "%s", usage_string); stream->write_function(stream, "%s", usage_string);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论