comparison MoinMoin/log.py @ 5943:51ea4cb7b390

at startup, announce moin version and code path
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 19 Feb 2013 23:59:31 +0100
parents c14974df2b58
children
comparison
equal deleted inserted replaced
5942:5142c2bfd655 5943:51ea4cb7b390
149 if err_msg: 149 if err_msg:
150 l.warning('load_config for "%s" failed with "%s".' % (conf_fname, err_msg)) 150 l.warning('load_config for "%s" failed with "%s".' % (conf_fname, err_msg))
151 l.info('using logging configuration read from built-in fallback in MoinMoin.log module') 151 l.info('using logging configuration read from built-in fallback in MoinMoin.log module')
152 warnings.showwarning = _log_warning 152 warnings.showwarning = _log_warning
153 153
154 import MoinMoin
155 code_path = os.path.dirname(MoinMoin.__file__)
156 from MoinMoin.version import project, release, revision
157 l.info('Running %s %s %s code from %s' % (project, release, revision, code_path))
158
154 159
155 def getLogger(name): 160 def getLogger(name):
156 """ wrapper around logging.getLogger, so we can do some more stuff: 161 """ wrapper around logging.getLogger, so we can do some more stuff:
157 - preprocess logger name 162 - preprocess logger name
158 - patch loglevel constants into logger object, so it can be used 163 - patch loglevel constants into logger object, so it can be used