From: Michael Tremer Date: Fri, 25 May 2012 12:07:41 +0000 (+0000) Subject: CLI: Disable debugging for status commands. X-Git-Tag: 004~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67d6dbb7bcad9e5facb3813c21cdbf0b9bb1e48d;p=network.git CLI: Disable debugging for status commands. When the debugging mode was enabled, the status screen was cluttered with a lot of unneeded log lines. The result was not readable at all. This patch termporarily disables the output of log messages to the console. --- diff --git a/functions.cli b/functions.cli index ab2c091c..554a6501 100644 --- a/functions.cli +++ b/functions.cli @@ -334,12 +334,21 @@ function cli_status() { exit ${EXIT_OK} fi + # When dumping status information, the debug + # mode clutters the console which is not what we want. + # Logging on the console is disabled for a short time. + local log_disable_stdout=${LOG_DISABLE_STDOUT} + LOG_DISABLE_STDOUT="true" + local zones=$(zones_get $@) local zone for zone in ${zones}; do zone_status ${zone} done + + # Reset logging. + LOG_DISABLE_STDOUT=${log_disable_stdout} } function cli_reset() {