tardis.io.logger.logger module

class tardis.io.logger.logger.FilterLog(log_level)[source]

Bases: object

Filter Log Class for Filtering Logging Output to a particular level

Parameters
log_levellogging object

allows to have a filter for the particular log_level

filter(log_record)[source]

filter() allows to set the logging level for all the record that are being parsed & hence remove those which are not of the particular level

Parameters
log_recordlogging.record

which the paricular record upon which the filter will be applied

Returns
booleanTrue, if the current log_record has the

level that of the specified log_level False, if the current log_record doesn’t have the same log_level as the specified one

tardis.io.logger.logger.logging_state(log_level, tardis_config, specific_log_level)[source]

Function to set the logging configuration for the simulation output Called from within run_tardis() Configured via functional arguments passed through run_tardis() - log_level & specific_log_level Configured via YAML parameters under debug section - log_level & specific_log_level

Parameters
log_level: str

Allows to input the log level for the simulation Uses Python logging framework to determine the messages that will be output

specific_log_level: boolean

Allows to set specific logging levels. Logs of the log_level level would be output.

tardis.io.logger.logger.tardis_logger()[source]

Generates the list of the loggers which are derived from TARDIS All loggers which are of the form tardis.module_name are added to the list

Parameters
list_for_loggerslist

List for storing the loggers derived from TARDIS

Returns
list_for_loggerslist