Log Manager Module
- class mtf.network_port.tls.managers.log_manager.TlsLogManager
Manages Log4j2 dynamic reconfiguration for TLS Attacker logging.
This class allows you to update the log file path without restarting the JVM. It sets the ‘logFilename’ system property, forces a reconfiguration of Log4j2, and replaces the FileAppender with a new one pointing to the new log file.
- __init__(log_directory='Logs', log_filename='tls_attacker.log')
Initializes the TlsLogManager with the specified log directory and filename.
- Args:
log_directory (str): Directory where logs should be stored. log_filename (str): Name of the log file.
- update_file_appender()
Updates the Log4j2 FileAppender to use the new log file path.