[master 2/2] introduce loglevel flag and use it in yum's tty3 logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 anaconda      |    1 +
 flags.py      |    1 +
 yuminstall.py |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/anaconda b/anaconda
index b87c58a..bcb8fc1 100755
--- a/anaconda
+++ b/anaconda
@@ -304,6 +304,7 @@ def setupLoggingFromOpts(opts):
         level = logLevelMap[opts.loglevel]
         setHandlersLevel(log, level)
         setHandlersLevel(storage.storage_log.logger, level)
+        flags.loglevel = level
 
     if opts.syslog:
         if opts.syslog.find(":") != -1:
diff --git a/flags.py b/flags.py
index 17bc2e0..314e0ec 100644
--- a/flags.py
+++ b/flags.py
@@ -85,6 +85,7 @@ class Flags:
         self.__dict__['flags']['useIPv4'] = True
         self.__dict__['flags']['useIPv6'] = True
         self.__dict__['flags']['sshd'] = 1
+        self.__dict__['flags']['loglevel'] = None
         # for non-physical consoles like some ppc and sgi altix,
         # we need to preserve the console device and not try to
         # do things like bogl on them.  this preserves what that
diff --git a/yuminstall.py b/yuminstall.py
index 7a1f0c5..e7b8387 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -632,6 +632,7 @@ class AnacondaYum(YumSorter):
         logger.setLevel(yum.logginglevels.INFO_2)
         logger.addHandler(file_handler)
         anaconda_log.autoSetLevel(tty3_handler, True)
+        tty3_handler.setLevel(flags.loglevel)
         logger.addHandler(tty3_handler)
 
         # XXX filelogger is set in setFileLog - do we or user want it?
-- 
1.6.2.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux