FileHandlers Module
This module contains classes and functions related to file handlers in the EventManager.
- class EventManager.filehandlers.LogHandler(config_path: str)[source]
Bases:
objectThe LogHandler class is responsible for managing the logging configuration and log files.
- property config: Config
- property current_file_name: str
- property current_internal_file_name: str
- property internal_event_manager
- rotate_log_file(file: Path)[source]
Rotate the log file by renaming it with a timestamp.
- Parameters:
file – The log file to rotate.
- check_if_log_file_exists()[source]
Check if the log file exists.
- Returns:
True if the log file exists, False otherwise.
- EventManager.filehandlers.default_processors() list[EventManager.filehandlers.config.processor_entry.ProcessorEntry][source]
Create a list of default processors for the EventManager. :return: A list containing a single ProcessorEntry instance.
- EventManager.filehandlers.default_outputs() list[EventManager.filehandlers.config.output_entry.OutputEntry][source]
Create a list of default outputs for the EventManager. :return: A list containing a single OutputEntry instance.