populse_mia.logging_config¶
Utilities for configuring and managing application logging.
This module provides helper functions to initialize logging, create log files, and remove old log files according to the configured retention policy.
Functions
|
Configure the application logging. |
- populse_mia.logging_config.configure_logging(log_in_stdout: bool, keep_log_files: int, log_level: str) None[source]¶
Configure the application logging.
- populse_mia.logging_config._cleanup_old_logs(log_dir: Path, keep_log_files: int) None[source]¶
Remove the oldest log files from the log directory.
Deletes log files matching
mia_*.loguntil at mostkeep_log_fileslog files remain.- Parameters:
log_dir (pathlib.Path) – Directory containing the log files.
keep_log_files (int) – Maximum number of log files to keep.