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

[master 2/6] logging: remove addSysLogHandler()



not needed, because
:: "syslog=" from the kernel is handled once in init.c,
:: "logging" in the kickstart in handled by  AnacondaLog.updateRemote().
---
 anaconda        |    5 -----
 anaconda_log.py |    9 ---------
 2 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/anaconda b/anaconda
index 7b8034c..7b4149c 100755
--- a/anaconda
+++ b/anaconda
@@ -305,11 +305,6 @@ def setupLoggingFromOpts(opts):
 
     if opts.syslog:
         anaconda_log.logger.remote_syslog = opts.syslog
-        if opts.syslog.find(":") != -1:
-            (host, port) = opts.syslog.split(":")
-            anaconda_log.logger.addSysLogHandler(log, host, port=int(port))
-        else:
-            anaconda_log.logger.addSysLogHandler(log, opts.syslog)
 
 # ftp installs pass the password via a file in /tmp so
 # ps doesn't show it
diff --git a/anaconda_log.py b/anaconda_log.py
index d8d3bb5..27dcf40 100644
--- a/anaconda_log.py
+++ b/anaconda_log.py
@@ -132,15 +132,6 @@ class AnacondaLog:
         newLogger = logging.getLogger(name)
         newLogger.setLevel(minLevel)
 
-    # Add a handler for remote syslogs.
-    def addSysLogHandler (self, logger, host, port=SYSLOG_UDP_PORT,
-                          minLevel=DEFAULT_TTY_LEVEL):
-        fmt = logging.Formatter("%(levelname)-8s %(message)s")
-        syslogHandler = SysLogHandler((host, port))
-        syslogHandler.setLevel(minLevel)
-        syslogHandler.setFormatter(fmt)
-        logger.addHandler(syslogHandler)
-
     def forwardToSyslog(self, logger):
         """Forward everything that goes in the logger to the syslog daemon.
         """
-- 
1.6.6


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