munkicommon.display_warning and munkicommon.display_error now only write to log if munkicommon.verbose < 1

This commit is contained in:
Greg Neagle
2011-12-21 08:39:30 -08:00
parent 19b4a0bbc7
commit 820a231e78
+4 -2
View File
@@ -394,7 +394,8 @@ def display_warning(msg, *args):
"""
msg = concat_log_message(msg, *args)
warning = 'WARNING: %s' % msg
print >> sys.stderr, warning.encode('UTF-8')
if verbose > 0:
print >> sys.stderr, warning.encode('UTF-8')
log(warning)
# append this warning to our warnings log
log(warning, 'warnings.log')
@@ -417,7 +418,8 @@ def display_error(msg, *args):
"""
msg = concat_log_message(msg, *args)
errmsg = 'ERROR: %s' % msg
print >> sys.stderr, errmsg.encode('UTF-8')
if verbose > 0:
print >> sys.stderr, errmsg.encode('UTF-8')
log(errmsg)
# append this error to our errors log
log(errmsg, 'errors.log')