Initialization.logger_control moduleο
- initialization.logger_control.get_logger(name: str) Logger [source]ο
Get a logger instance with the specified name.
Creates or retrieves a logger with the given name. The logger will inherit the configuration set by start_logger() if it has been called previously.
- Parameters:
name (str) β Name to identify the logger. Typically you would use __name__ to automatically create loggers that match the module hierarchy.
- Returns:
Configured logger instance ready for use.
- Return type:
logging.Logger
Example
>>> logger = get_logger(__name__) >>> logger.info("This is an info message")
- initialization.logger_control.start_logger() None [source]ο
Initialize the basic configuration for the logging system.
This function sets up the root logger with a basic configuration that includes: - Logging level: INFO (captures INFO, WARNING, ERROR and CRITICAL messages)
Note
This should be called only once at the beginning of the application setup. Subsequent calls wonβt have any effect unless the logging system is reset.