CustomTimedRotatingFileHandler.__init__

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

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

Parameters
  • path (str) – Parent directory to save all logs.

  • basename (str) – File base name where date will be appended, without extension.

  • extension (str, optional) – Log file extension, default is ‘log’.

Raises

OSError – The logging directory could not be created. The handler should not be used if this exception is raised.