lifecyclelogging.handlers
Handlers for different logging outputs.
Module Contents
Section titled “Module Contents”Functions
Section titled “Functions”add_file_handler | Add a file handler to the logger, ensuring the file name is valid. |
|---|---|
add_console_handler | Adds a Rich console handler to the logger. |
lifecyclelogging.handlers.add_file_handler(logger: logging.Logger, log_file_name: str) → None
Section titled “lifecyclelogging.handlers.add_file_handler(logger: logging.Logger, log_file_name: str) → None”Add a file handler to the logger, ensuring the file name is valid.
Args: logger (logging.Logger): The logger to which the file handler will be added. log_file_name (str): The name of the log file.
lifecyclelogging.handlers.add_console_handler(logger: logging.Logger) → None
Section titled “lifecyclelogging.handlers.add_console_handler(logger: logging.Logger) → None”Adds a Rich console handler to the logger.
Args: logger (logging.Logger): The logger to which the console handler will be added.