Ignore:
Timestamp:
24 Feb 2013, 13:42:04 (12 years ago)
Author:
uli
Message:

Use WatchedFileHandler? instead of DatedRotatingFileHandler? for logging.

File:
1 edited

Legend:

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

    r9769 r9988  
    7676import grok
    7777import logging
     78from logging.handlers import WatchedFileHandler
    7879from string import Template
    7980from ulif.loghandlers import DatedRotatingFileHandler
     
    215216
    216217        # Create a rotating file handler logger.
    217         handler = DatedRotatingFileHandler(
    218             filename, when='MON', backupCount=BACKUP_COUNT)
     218        handler = WatchedFileHandler(
     219            filename, encoding='utf-8')
     220        #handler = DatedRotatingFileHandler(
     221        #    filename, when='MON', backupCount=BACKUP_COUNT)
    219222        handler.setLevel(LEVEL)
    220223        formatter = logging.Formatter(self.logger_format_str)
Note: See TracChangeset for help on using the changeset viewer.