dictIO.utils.logging¶
Functions to configure logging for the application.
Functions
|
Configure logging for the application, allowing for both console and file logging. |
- dictIO.utils.logging.configure_logging(log_level_console: str = 'WARNING', log_file: Path | None = None, log_level_file: str = 'WARNING') None¶
Configure logging for the application, allowing for both console and file logging.
Sets the log levels and formats for console output and, when requested, file output.
- Parameters:
log_level_console (str) – Logging level for console output. Defaults to “WARNING”.
log_file (Path | None) – Path to the log file. If None, file logging is disabled. Defaults to None.
log_level_file (str) – Logging level for file output. Defaults to “WARNING”.
- Raises:
TypeError – If either logging level is not a valid logging level name.
- Return type:
None
Examples
Configure console and file logging:
log_level_console=”INFO”, log_file=Path(“app.log”), log_level_file=”DEBUG”,
)¶