[Mailman-Developers] Logging issues on the trunk

Mark Sapiro msapiro at value.net
Tue Apr 25 23:46:58 CEST 2006


There are a few remaining issues regarding logging in the svn trunk.

1) The ReopenableFileHandler.__init__ method in Mailman/loginit.py
   calls

         logging.FileHandler.__init__(self, filename, mode, encoding)

   This method only allows the instance, filename and mode arguments.
   The encoding argument throws a TypeError exception.

2) The 'locks' log is missing from the LOGGERS tuple in loginit.py

3) Mailman/LogFile.py still references Mailman.Logging.StampedLogger
   This is tricky if we want to maintain its current ability to be
   used outside of Mailman.

   I *think* we could change

        try:
            from Mailman.Logging.StampedLogger import StampedLogger
            _logfile = StampedLogger('locks')

   to

        try:
            from Mailman import loginit
            _logfile = logging.getLogger('mailman.locks')
            _logfile.write = _logfile.info

   where the import of loginit is just to see if it throws the
   exception. I'm not sure if we ever need to actually call

            loginit.initialize()

   as in most if not all cases, this has already been done by some
   superordinate importer of LogFile.

4) Many of the scripts/* files contain

        from Mailman.Logging.Utils import LogStdErr

        and

            LogStdErr('error', 'name')

I think these can just be deleted as the scripts/driver script
does the Mailman.loginit.initialize()

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Developers mailing list