pricegenerator.UniLogger

This module init standard python logging system with some of pre-defined parameters, e.g. debug level for log-file, info level for console, log-rotate and so on.

Current internal logger name for PriceGenerator module is PriceGenerator-UniLogger.

UniLogger = <Logger PriceGenerator-UniLogger (DEBUG)>
formatString = '%(filename)-20sL:%(lineno)-5d%(levelname)-8s[%(asctime)s] %(message)s'
formatter = <logging.Formatter object>
def SetLevel(vLevel='ERROR'):

This procedure setting up UniLogger verbosity level.

class LevelFilter(logging.Filter):

Class using to set up log level filtering.

LevelFilter(level)

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

level
def filter(self, record):

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

Inherited Members
logging.Filter
name
nlen
def EnableLogger( logFile, parentHandler=<Logger PriceGenerator-UniLogger (DEBUG)>, useFormat=<logging.Formatter object>):

Adding new file logger with rotation.

def DisableLogger(handler, parentHandler=<Logger PriceGenerator-UniLogger (DEBUG)>):

Disable given file logger.

streamHandler = <StreamHandler (INFO)>
sepWide = '------------------------------------------------------------------------------------------------------------------------'
sepLong = '--------------------------------------------------------------------------------'
sepShort = '----------------------------------------'
sepLine = '=--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--='