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 > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 01-04-2010, 02:25 PM
Ales Kozumplik
 
Default get rid of global import of anaconda_log

---
anaconda | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/anaconda b/anaconda
index bcb8fc1..c99f32d 100755
--- a/anaconda
+++ b/anaconda
@@ -300,18 +300,18 @@ def setupEnvironment():
os.environ["PIXMAPPATH"] = "/tmp/updates/pixmaps/:/tmp/updates/:/tmp/product/pixmaps/:/tmp/product/ixmaps/:/usr/share/anaconda/pixmaps/:/usr/share/pixmaps/:/usr/share/anaconda/:/usr/share/python-meh/"

def setupLoggingFromOpts(opts):
- if opts.loglevel and logLevelMap.has_key(opts.loglevel):
- level = logLevelMap[opts.loglevel]
- setHandlersLevel(log, level)
- setHandlersLevel(storage.storage_log.logger, level)
+ if opts.loglevel and anaconda_log.logLevelMap.has_key(opts.loglevel):
+ level = anaconda_log.logLevelMap[opts.loglevel]
+ anaconda_log.setHandlersLevel(log, level)
+ anaconda_log.setHandlersLevel(storage.storage_log. logger, level)
flags.loglevel = level

if opts.syslog:
if opts.syslog.find(":") != -1:
(host, port) = opts.syslog.split(":")
- logger.addSysLogHandler(log, host, port=int(port))
+ anaconda_log.logger.addSysLogHandler(log, host, port=int(port))
else:
- logger.addSysLogHandler(log, opts.syslog)
+ anaconda_log.logger.addSysLogHandler(log, opts.syslog)

def getInstClass():
from installclass import DefaultInstall
@@ -574,7 +574,7 @@ if __name__ == "__main__":

# Set up logging as early as possible.
import logging
- from anaconda_log import logger, logLevelMap, setHandlersLevel
+ import anaconda_log

log = logging.getLogger("anaconda")
stdoutLog = logging.getLogger("anaconda.stdout")
@@ -615,7 +615,7 @@ if __name__ == "__main__":
anaconda.platform = platform.getPlatform(anaconda)

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

warnings.showwarning = AnacondaShowWarning

--
1.6.2.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-04-2010, 05:13 PM
Chris Lumens
 
Default get rid of global import of anaconda_log

> anaconda | 16 ++++++++--------
> 1 files changed, 8 insertions(+), 8 deletions(-)

Looks fine, but what's the reason for making this change? Are you just
sick of having too many names similar to "logger" around at the same
time?

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-05-2010, 06:59 AM
Ales Kozumplik
 
Default get rid of global import of anaconda_log

On 01/04/2010 07:13 PM, Chris Lumens wrote:

anaconda | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)


Looks fine, but what's the reason for making this change? Are you just
sick of having too many names similar to "logger" around at the same
time?

- Chris


Yes. 'logger' and the new method calls look like something that is
defined in 'anaconda' and it is a little confusing when one looks at the
code. The change is only a couple of places but makes the logging look
clearer.


Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-05-2010, 02:25 PM
Chris Lumens
 
Default get rid of global import of anaconda_log

> >Looks fine, but what's the reason for making this change? Are you just
> >sick of having too many names similar to "logger" around at the same
> >time?
> >
> >- Chris
>
> Yes. 'logger' and the new method calls look like something that is
> defined in 'anaconda' and it is a little confusing when one looks at
> the code. The change is only a couple of places but makes the
> logging look clearer.

Okay, that's fine then.

- Chris

_______________________________________________
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 02:52 PM.

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