Changeset 6376 for main


Ignore:
Timestamp:
16 Jun 2011, 01:26:13 (14 years ago)
Author:
uli
Message:

Use loggername as key.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/utils/logger.py

    r6371 r6376  
    184184        return waeup_logger.logger
    185185
    186     def register(self, filename, loggername=None, site=None, **kw):
    187         if filename in self._loggers.keys():
    188             raise KeyError('Logger "%s" exists already.' % filename)
    189         if loggername is None:
    190             loggername = filename
    191             if '.' in filename:
    192                 loggername = filename.rplit('.', 1)[0]
    193             loggername = 'waeup.sirp.%s.%s' % ('%s', loggername)
    194         self._loggers[filename] = WAeUPLogger(
     186    def register(self, loggername, filename=None, site=None, **kw):
     187        if loggername in self._loggers.keys():
     188            raise KeyError('Logger "%s" exists already.' % loggername)
     189        self._loggers[loggername] = WAeUPLogger(
    195190            loggername, filename=filename, site=site, **kw)
    196191        return
Note: See TracChangeset for help on using the changeset viewer.