CustomTimedRotatingFileHandler

Description

class lab_utils.custom_logging.CustomTimedRotatingFileHandler(path: str, basename: str, extension: str = '.log')[source]

Variation of TimedRotatingFileHandler. The handler will produce daily log files to a given directory, appending the date to a given base name.

Attributes

CustomTimedRotatingFileHandler.basename

Complete file base name where date will be appended, without extension.

CustomTimedRotatingFileHandler.extension

Log file extension.

CustomTimedRotatingFileHandler.path

Parent directory to save all logs.

CustomTimedRotatingFileHandler.rolloverAt

Next rollover time

CustomTimedRotatingFileHandler.stream

File stream

Methods

CustomTimedRotatingFileHandler.__init__

Calls the parent constructor and creates the logging directory, if it does not exist.

CustomTimedRotatingFileHandler.doRollover

Rotates log files on daily basis.