Re: [master 1/6] logging: addFileHandler does not set autoLevel by default

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

 



Ack.

On 02/17/2010 05:53 PM, Ales Kozumplik wrote:
---
  anaconda               |    3 ++-
  anaconda_log.py        |    6 +++---
  storage/storage_log.py |    3 ++-
  3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/anaconda b/anaconda
index f4ab9e2..96595fa 100755
--- a/anaconda
+++ b/anaconda
@@ -811,7 +811,8 @@ if __name__ == "__main__":

      if not iutil.isS390() and os.access("/dev/tty3", os.W_OK):
          anaconda_log.logger.addFileHandler("/dev/tty3", log,
-                                           fmtStr=anaconda_log.TTY_FORMAT)
+                                           fmtStr=anaconda_log.TTY_FORMAT,
+                                           autoLevel=True)

      warnings.showwarning = AnacondaShowWarning

diff --git a/anaconda_log.py b/anaconda_log.py
index 3f7baa3..31a8f74 100644
--- a/anaconda_log.py
+++ b/anaconda_log.py
@@ -71,14 +71,14 @@ class AnacondaLog:
          self.logger = logging.getLogger("anaconda")
          self.logger.setLevel(logging.DEBUG)
          self.addFileHandler(MAIN_LOG_FILE, self.logger,
-                            autoLevel=False, minLevel=logging.DEBUG)
+                            minLevel=logging.DEBUG)
          self.forwardToSyslog(self.logger)

          # External program output log
          program_logger = logging.getLogger("program")
          program_logger.setLevel(logging.DEBUG)
          self.addFileHandler(PROGRAM_LOG_FILE, program_logger,
-                            autoLevel=False, minLevel=logging.DEBUG)
+                            minLevel=logging.DEBUG)
          self.forwardToSyslog(program_logger)

          # Create a second logger for just the stuff we want to dup on
@@ -95,7 +95,7 @@ class AnacondaLog:
      # Add a simple handler - file or stream, depending on what we're given.
      def addFileHandler (self, file, addToLogger, minLevel=DEFAULT_TTY_LEVEL,
                          fmtStr=ENTRY_FORMAT,
-                        autoLevel=True):
+                        autoLevel=False):
          if isinstance(file, types.StringTypes):
              logfileHandler = logging.FileHandler(file)
          else:
diff --git a/storage/storage_log.py b/storage/storage_log.py
index e5dbadc..a52513d 100644
--- a/storage/storage_log.py
+++ b/storage/storage_log.py
@@ -27,5 +27,6 @@ logger.setLevel(logging.DEBUG)
  anaconda_log.logger.addFileHandler("/tmp/storage.log", logger, logging.DEBUG)
  anaconda_log.logger.addFileHandler("/dev/tty3", logger,
                                     anaconda_log.DEFAULT_TTY_LEVEL,
-                                   anaconda_log.TTY_FORMAT)
+                                   anaconda_log.TTY_FORMAT,
+                                   autoLevel=True)
  anaconda_log.logger.forwardToSyslog(logger)

_______________________________________________
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