progress.progress_logging
This module implements a specific logging API tuned for Quantum Internet simulations on Netsquid.
- progress.progress_logging.critical(message, repeater_id=None, protocol=None, protocol_state=None)[source]
Log a message with level CRITICAL on the logger.
- Parameters:
- messagestr
The message to be logged. It should not contain the current simulation time because it is already present in the log format.
- repeater_idint or None, optional
If not None, an additional string is added to the log entry, containing the components.rst identifier.
- protocolstr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols name.
- protocol_statestr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols state.
- progress.progress_logging.debug(message, repeater_id=None, protocol=None, protocol_state=None)[source]
Log a message with level DEBUG on the logger.
- Parameters:
- messagestr
The message to be logged. It should not contain the current simulation time because it is already present in the log format.
- repeater_idint or None optional
If not None, an additional string is added to the log entry, containing the components.rst identifier.
- protocolstr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols name.
- protocol_statestr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols state.
- progress.progress_logging.error(message, repeater_id=None, protocol=None, protocol_state=None)[source]
Log a message with level ERROR on the logger.
- Parameters:
- messagestr
The message to be logged. It should not contain the current simulation time because it is already present in the log format.
- repeater_idint or None, optional
If not None, an additional string is added to the log entry, containing the components.rst identifier.
- protocolstr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols name.
- protocol_statestr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols state.
- progress.progress_logging.info(message, repeater_id=None, protocol=None, protocol_state=None)[source]
Log a message with level INFO on the logger.
- Parameters:
- messagestr
The message to be logged. It should not contain the current simulation time because it is already present in the log format.
- repeater_idint or None, optional
If not None, an additional string is added to the log entry, containing the components.rst identifier.
- protocolstr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols name.
- protocol_statestr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols state.
- progress.progress_logging.log_to_console(level=10)[source]
Activate log output to the stdout console.
- Parameters:
- levelint, optional
The logging level for the console. Defaults to logging.DEBUG
- Returns:
logging.StreamHandler
The handler of the log output.
- progress.progress_logging.log_to_file(filename, level=10)[source]
Activate log output to the specified file.
- Parameters:
- filenamestr
The name of the output log file. If not present it is created. It is opened in append mode.
- levelint, optional
The logging level on the file. Defaults to logging.DEBUG
- Returns:
- logging.FileHandler
The handler of the log output.
- progress.progress_logging.set_log_level(level)[source]
Set the log level on all outputs.
- Parameters:
- levelint
The new log level.
- progress.progress_logging.warning(message, repeater_id=None, protocol=None, protocol_state=None)[source]
Log a message with level WARNING on the logger.
- Parameters:
- messagestr
The message to be logged. It should not contain the current simulation time because it is already present in the log format.
- repeater_idint or None, optional
If not None, an additional string is added to the log entry, containing the components.rst identifier.
- protocolstr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols name.
- protocol_statestr or None, optional
If not None, an additional string is added to the log entry, containing the provided protocols state.