tlo.logging.helpers module

set_output_file(log_path: Path) FileHandler[source]

Add filehandler to logger

Parameters:

log_path – path for file

Returns:

filehandler object

set_logging_levels(custom_levels: Dict[str, int])[source]

Set custom logging levels for disease modules

Parameters:

custom_levels – Dictionary of modules and their level, ‘*’ can be used as a key for all modules

init_logging(add_stdout_handler=True)[source]

Initialise default logging with stdout stream

set_simulation(simulation)[source]

Inject simulation into logger for structured logging, called by the simulation :param simulation: :return: