LoggingHandler
- class logman.handler.ConsoleLoggingHandler(formatter: Formatter, level: int = 10)[source]
Bases:
StreamHandler
A custom logging handler that outputs logs to the console.
- Parameters:
formatter (logging.Formatter) – The formatter to use for formatting log messages.
level (int, optional) – The logging level. Defaults to logging.DEBUG.
- class logman.handler.FileRotateLoggingHandler(formatter: Formatter, filePath: str | PathLike, maxBytes: int, level: int = 10)[source]
Bases:
RotatingFileHandler
A custom logging handler that writes logs to a file with rotation.
- Parameters:
formatter (logging.Formatter) – The formatter to use for formatting log messages.
filePath (Union[str, os.PathLike]) – The path to the log file.
maxBytes (int) – The maximum size of the log file before rotation occurs.
level (int, optional) – The logging level. Defaults to logging.DEBUG.