skidl.logger module¶
Logging for generic messages and ERC.
- class skidl.logger.ActiveLogger(logger)[source]¶
Bases:
skidl.logger.SkidlLogger
Currently-active logger for a given phase of operations.
- push(logger)[source]¶
Save the currently active logger and activate the given logger.
- Parameters
logger (SkidlLogger) – Logger to be activated.
- set(logger)[source]¶
Set the active logger.
- Parameters
logger (SkidlLogger) – Logger that will be used for current phase of operations.
- class skidl.logger.CountCalls(func)[source]¶
Bases:
object
Decorator for counting the number of times a function is called.
This is used for counting errors and warnings passed to logging functions, making it easy to track if and how many errors/warnings were issued.
- class skidl.logger.SkidlLogFileHandler(*args, **kwargs)[source]¶
Bases:
logging.FileHandler
Logger that outputs messages to a file.
- class skidl.logger.SkidlLogger(*args, **kwargs)[source]¶
Bases:
logging.Logger
SKiDL logger that can stop output to log files and delete them.
- critical(msg, *args, **kwargs)[source]¶
Log ‘msg % args’ with severity ‘CRITICAL’.
To pass exception information, use the keyword argument exc_info with a true value, e.g.
logger.critical(“Houston, we have a %s”, “major disaster”, exc_info=1)
- debug(msg, *args, **kwargs)[source]¶
Log ‘msg % args’ with severity ‘DEBUG’.
To pass exception information, use the keyword argument exc_info with a true value, e.g.
logger.debug(“Houston, we have a %s”, “thorny problem”, exc_info=1)
- error(msg, *args, **kwargs)[source]¶
Log ‘msg % args’ with severity ‘ERROR’.
To pass exception information, use the keyword argument exc_info with a true value, e.g.
logger.error(“Houston, we have a %s”, “major problem”, exc_info=1)
- info(msg, *args, **kwargs)[source]¶
Log ‘msg % args’ with severity ‘INFO’.
To pass exception information, use the keyword argument exc_info with a true value, e.g.
logger.info(“Houston, we have a %s”, “interesting problem”, exc_info=1)
- raise_(exc_class, msg)[source]¶
Issue a logging message and then raise an exception.
- Parameters
exc_class (Exception class) – Class of exception to raise.
msg (string) – Error message.
- Raises
exc_class – Exception class that is raised after error message is logged.