I am trying to write a log in python; I would like to be able to load the configuration from a file, but I get an error after a call:
logging.config.fileConfig ('logging.conf') Traceback (last last call): File "/usr/lib64/python2.4/logging/config.py", line 157, in the Config log.addHandler file (handlers [hand] ) KeyError: 'simpleHandler'
My config:
[loggers] keys=root [handlers] keys=simpleHandler [formatters] keys=simpleFormatter [logger_root] level=DEBUG handlers=simpleHandler [handler_simpleHandler] formatter=simpleFormatter class=handlers.RotatingFileHandler filename=/tmp/test.log maxBytes=31457280 level=DEBUG [formatter_simpleFormatter] format=%(asctime)s %(levelname)s %(message)s datefmt=%Y/%m/%d %H:%M:%S
Please help me determine what the error is, thanks.
source share