atkinson.logging package

Submodules

atkinson.logging.logger module

Interface to get a configured logger

atkinson.logging.logger.getLogger(config=None)[source]

Returns a logger object of the type specified.

Parameters:config – Dictionary of values to configure the desired logger object.

For example, to use the default python logger, you can either simply pass None, or specify any details supported by the atkinson default driver for the python logger. You would specify the default logger (with custom loglevel) with:

{'driver':'atkinson.logging.drivers.default',
'root':{'level':DEBUG}}

The atkinson logging wrapper code specifies a toplevel element in the config dict of ‘driver’, pointing at the driver that will load the desired configuration and return a logger to use.

Each driver must implement getLogger, so we can invoke it the same way from this interface. In theory, drivers could be released as separate modules.

Module contents