commit c8ea3f5e17e48c577d8f6dde6ac0b782b72f98d6 Author: Bryn M. Reeves Date: Mon Nov 18 12:52:40 2013 +0000 Change default console log level to WARNING to match sos-2.2 Commit 6ea48cb changed the default log level for console output from WARNING to ERROR and reclassified several messages. This causes plug-in validation messages to be silent at the default verbosity. Signed-off-by: Bryn M. Reeves diff --git a/sos/sosreport.py b/sos/sosreport.py index 4ea5f95..595015f 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -669,7 +669,7 @@ class SoSReport(object): elif self.opts.verbosity > 0: console.setLevel(logging.INFO) else: - console.setLevel(logging.ERROR) + console.setLevel(logging.WARNING) self.soslog.addHandler(console) # ui log commit c2ab28f7fb159f149314a83f2493739f2d2aa88b Author: Bryn M. Reeves Date: Mon Nov 18 13:02:19 2013 +0000 Reclasify 'error' messages as 'warning' Several log messages used the 'error' level when reporting an event that is not necessarily an error (and does not prevent sos from continuing). Reclassify these to the 'warning' log level instead. Signed-off-by: Bryn M. Reeves diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py index 1afe9df..f96fe6c 100644 --- a/sos/plugins/kernel.py +++ b/sos/plugins/kernel.py @@ -32,7 +32,7 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): modules = os.listdir(self.sys_module) self.add_cmd_output("modinfo " + " ".join(modules)) except OSError: - self.soslog.error("could not list %s" % self.sys_module) + self.soslog.warning("could not list %s" % self.sys_module) self.add_cmd_output("dmesg") self.add_cmd_output("sysctl -a") diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py index 570262a..1086208 100644 --- a/sos/plugins/sar.py +++ b/sos/plugins/sar.py @@ -47,7 +47,7 @@ class Sar(Plugin,): try: dirList = os.listdir(self.sa_path) except: - self.soslog.error("sar: could not list /var/log/sa") + self.soslog.warning("sar: could not list /var/log/sa") return # find all the sa file that don't have an existing sar file for fname in dirList: diff --git a/sos/sosreport.py b/sos/sosreport.py index 595015f..1c81af9 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -772,13 +772,13 @@ class SoSReport(object): for plugin_class in plugin_classes: if not self.policy.validatePlugin(plugin_class): - self.soslog.debug(_("plugin %s does not validate, skipping") % plug) + self.soslog.warning(_("plugin %s does not validate, skipping") % plug) if self.opts.verbosity > 0: self._skip(plugin_class, _("does not validate")) continue if plugin_class.requires_root and not self._is_root: - self.soslog.debug(_("plugin %s requires root permissions to execute, skipping") % plug) + self.soslog.info(_("plugin %s requires root permissions to execute, skipping") % plug) self._skip(plugin_class, _("requires root")) continue