pystclient.utils.logging¶
Functions to configure logging for the application.
Functions
|
Configure logging for the application, allowing for both console and file logging. |
- pystclient.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 the output, ensuring that logs are captured as specified.
- Parameters:
log_level_console – Log level for console output. Defaults to “WARNING”.
log_file – Log file to be used. If None, file logging is disabled. Defaults to None.
log_level_file – Log level for file output. Defaults to “WARNING”.
- Raises:
TypeError – If an invalid value for log_level_console or log_level_file is passed.
Example
configure_logging(log_level_console=”INFO”, log_file=Path(“app.log”), log_level_file=”DEBUG”)