From 67d6dbb7bcad9e5facb3813c21cdbf0b9bb1e48d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 25 May 2012 12:07:41 +0000 Subject: [PATCH] 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. --- functions.cli | 9 +++++++++ 1 file changed, 9 insertions(+) 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() { -- 2.47.3