koi_net.infra.log_system
Classes
|
Configures and initializes the logging system. |
|
- class koi_net.infra.log_system.LogSystem(use_file_handler=True, use_console_handler=True, file_handler_log_level=10, console_handler_log_level=10)[source]
Bases:
objectConfigures and initializes the logging system.
- Parameters:
use_file_handler (bool)
use_console_handler (bool)
file_handler_log_level (int)
console_handler_log_level (int)
- console_handler_log_level: int
- static delete_file_handler(log_dir, wipe_logs=False)[source]
- Parameters:
log_dir (str)
wipe_logs (bool)
- file_handler_log_level: int
- use_console_handler: bool
- use_file_handler: bool
- class koi_net.infra.log_system.PartitionedFileHandler(log_file_name='log.ndjson', max_log_file_size=10485760, num_log_file_backups=5, log_file_encoding='utf-8')[source]
Bases:
Handler- Parameters:
log_file_name (str)
max_log_file_size (int)
num_log_file_backups (int)
log_file_encoding (str)
- emit(record)[source]
Do whatever it takes to actually log the specified logging record.
This version is intended to be implemented by subclasses and so raises a NotImplementedError.
- Parameters:
record (LogRecord)
- handlers: dict[str, RotatingFileHandler]