(self, config)
Create a new instance of the ArchiveHandler class
Create a new instance of the ArchiveHandler class
Create a new instance of the ArchiveHandler class
def __init__(self, config):
        """
        Create a new instance of the ArchiveHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        # Create Archive Logger
        self.archive = logging.getLogger('archive')
        self.archive.setLevel(logging.DEBUG)
        self.archive.propagate = self.config['propagate']
        # Create Archive Log Formatter
        formatter = logging.Formatter('%(message)s')
        # Create Archive Log Handler
        handler = logging.handlers.TimedRotatingFileHandler(
            filename=self.config['log_file'],
            when=self.config['when'],
            interval=int(self.config['rollover_interval']),
            backupCount=int(self.config['days']),
            encoding=self.config['encoding']
        )
        handler.setFormatter(formatter)
        handler.setLevel(logging.DEBUG)
        self.archive.addHandler(handler)
def __init__ ( self , config ) : # Initialize Handler Handler . __init__ ( self , config ) # Create Archive Logger self . archive = logging . getLogger ( 'archive' ) self . archive . setLevel ( logging . DEBUG ) self . archive . propagate = self . config [ 'propagate' ] # Create Archive Log Formatter formatter = logging . Formatter ( '%(message)s' ) # Create Archive Log Handler handler = logging . handlers . TimedRotatingFileHandler ( filename = self . config [ 'log_file' ] , when = self . config [ 'when' ] , interval = int ( self . config [ 'rollover_interval' ] ) , backupCount = int ( self . config [ 'days' ] ) , encoding = self . config [ 'encoding' ] ) handler . setFormatter ( formatter ) handler . setLevel ( logging . DEBUG ) self . archive . addHandler ( handler )