FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > EPEL Development

 
 
LinkBack Thread Tools
 
Old 05-20-2010, 03:22 PM
Ales Kozumplik
 
Default 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-20-2010, 06:27 PM
"Brian C. Lane"
 
Default logging: remove addSysLogHandler()

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/20/2010 08:22 AM, Ales Kozumplik wrote:
> 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.
> """

Ack

- --
Brian C. Lane <bcl@redhat.com>
Red Hat / Port Orchard, WA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEVAwUBS/V/JxF+jBaO/jp/AQIf7wf/d/Y5JnB/TFVzNEXxaT0ejIyENn636d2e
rVDcBdALvSobtI8YiRyBuCnso3orJBE+wyyy7edOoxbI0+y1Qa op0BpgJAdWEOp7
NqvBT+CVAJqHRTW812UTKTc1sbIhTSjtCA0LdbNDK0BKZAhob2 u6jGToccc8PZ2g
Wz2JNhmXHKVGR+BXlaNoUAKMeXDar7v/nAdRtKc7nlCVzoZLgthfMTkIVa6ajrMe
KqrvADU9Pg+ho8P9DIBlqY+5jhhwJ0u+PVxpyi3FP43BUa1q/c695XnI2eyAL9pr
2JZghgSPoLTLVs/u+FJ13DD8pR0WZnYFgrmVPUIVWosZKiVi0NMN1g==
=mvAw
-----END PGP SIGNATURE-----

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

Thread Tools




All times are GMT. The time now is 12:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org