logger

This module is essentially a convenience wrapper around the python logging module that configures a logger based on the package configuration and provides a preconfigured logger on demand via a get_logger function.

Use of this module requires that the configuration have a logger section with minimally handler and level settings. For example, to log at the info level to stdout set the handler to stdout and the level to info.

If the handler is set to syslog, a syslog_address must be given with the path of the socket file used to communicate with the syslog facility.

accre.logger.get_logger()[source]

Return the configured logger for the accre package. If the logger has not yet been configured, configure and return the newly created logger object.

If there is no logger in the configuration, stdout is used at the info level.

Returns:

Configured accre package logger

Return type:

logging.Logger