template_python.logging_setup

Logging setup for the server.

Functions

add_console_handler()

Add a console handler to the root logger.

add_file_handler(logging_filepath, ...)

Configure logging with both console and rotating file handlers.

setup_default_logging()

Configure default logging to console with the specified format and level.

template_python.logging_setup.add_console_handler()[source]

Add a console handler to the root logger.

Return type:

None

template_python.logging_setup.add_file_handler(logging_filepath, max_bytes, backup_count)[source]

Configure logging with both console and rotating file handlers.

Parameters:
  • logging_filepath (Path) – The path to the log file.

  • max_bytes (int) – The maximum size of the log file in bytes before rotation.

  • backup_count (int) – The number of backup log files to keep.

Return type:

None

template_python.logging_setup.setup_default_logging()[source]

Configure default logging to console with the specified format and level.

Return type:

None