watcher#
All functions and features for logging the app
- class src.tetue_generic.watcher.WatcherConfiguration(log_file_path='files/app.log', log_level='INFO')[source]#
Configuration model for the watcher component.
- src.tetue_generic.watcher.init_logging(conf_watcher)[source]#
Initializes logging configuration for the application..
- Parameters:
conf_watcher (watcher.WatcherConfiguration) – A configuration object containing logging settings.
- Return type:
- Returns:
None
Note
This function modifies the global logger object from Loguru.
Log files are rotated when they reach 100 MB in size.
Console output is colorized for better readability.
Initialization function#
The initialization process is performed by the src.tetue_generic.watcher.init_logging()
function. This function performs the following tasks:
Procedure for the initialization process#
Removes any existing log handlers.
Configures file logging with rotation and a size of 100MB.
Sets up console logging with color output
Log levels#
The following log levels are available:
TRACE
DEBUG
INFO
SUCCESS
WARNING
ERROR
CRITICAL