Blame SOURCES/sos-bz1031126-fix-verbose-file-logging.patch

629484
commit 23cdbd97a6bd2e44d87f01d6bf90b66667c4d7be
629484
Author: Bryn M. Reeves <bmr@redhat.com>
629484
Date:   Mon Feb 3 12:09:57 2014 +0000
629484
629484
    Fix verbose file logging
629484
    
629484
    Prior versions of sos enable debug logging to the embedded log
629484
    file (sos_logs/sos.log) when a single '-v' is given. Restore this
629484
    behaviour and ensure that command-not-found messages are reported
629484
    at 'info' rather than 'warning' level.
629484
    
629484
    Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
629484
629484
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
629484
index 681299a..b4768b0 100644
629484
--- a/sos/plugins/__init__.py
629484
+++ b/sos/plugins/__init__.py
629484
@@ -482,7 +482,7 @@ class Plugin(object):
629484
             self.soslog.warning("command '%s' timed out after %ds"
629484
                     % (prog, timeout))
629484
         if status == 127:
629484
-            self.soslog.warning("could not run '%s': command not found" % prog)
629484
+            self.soslog.info("could not run '%s': command not found" % prog)
629484
         return (status, output, runtime)
629484
 
629484
     def call_ext_prog(self, prog, timeout=300):
629484
diff --git a/sos/sosreport.py b/sos/sosreport.py
629484
index fb3aea7..22e0ab2 100644
629484
--- a/sos/sosreport.py
629484
+++ b/sos/sosreport.py
629484
@@ -651,6 +651,7 @@ class SoSReport(object):
629484
                 flog.setLevel(logging.DEBUG)
629484
             elif self.opts.verbosity > 0:
629484
                 console.setLevel(logging.INFO)
629484
+                flog.setLevel(logging.DEBUG)
629484
             else:
629484
                 console.setLevel(logging.WARNING)
629484
             self.soslog.addHandler(console)