From 34aa8b7c4bb6f5e2e788108e024c9cd70bdb3431 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Fri, 30 Sep 2011 11:28:59 +0200 Subject: [PATCH] utils.log: Write error messages to stderr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When βgnt-cluster copyfileβ failed it would only print βCopy of file β¦ to node β¦ failedβ. A detailed message is written using logging.error. Writing error messages to stderr can be helpful in figuring out what went wrong (the messages also go to the log file, but not everyone might know about it). Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/utils/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/log.py b/lib/utils/log.py index 281f59045..ceff25069 100644 --- a/lib/utils/log.py +++ b/lib/utils/log.py @@ -230,7 +230,7 @@ def SetupLogging(logfile, program, debug=0, stderr_logging=False, if debug: stderr_handler.setLevel(logging.NOTSET) else: - stderr_handler.setLevel(logging.CRITICAL) + stderr_handler.setLevel(logging.ERROR) root_logger.addHandler(stderr_handler) if syslog in (constants.SYSLOG_YES, constants.SYSLOG_ONLY): -- GitLab