Nathan English
Nathan English

Reputation: 784

Python Logger KeyError on Handlers

I've been staring at this config for a good while now and am unable to see the issue, however when I try to run the application I get a KeyError: 'handlers'. I really cannot see any issue with my config, which is below. I have two handlers both or which I have config blocks for...

[loggers]
keys=root,props,main,thread,rabbit,blockchain

[handlers]
keys=file,syslog

[formatters]
keys=simple

[logger_root]
level=DEBUG
handler=syslog

[logger_props]
level=DEBUG
handler=file
qualname=Properties
propagate=0

[logger_main]
level=DEBUG
handler=file
qualname=Main
propagate=0

[logger_thread]
level=DEBUG
handler=file
qualname=Thread
propagate=0

[logger_rabbit]
level=DEBUG
handler=file
qualname=RabbitMQ
propagate=0

[logger_blockchain]
level=DEBUG
handler=file
qualname=BigChainDB
propagate=0

[handler_file]
class=logging.handlers.RotatingFileHandler
level=ERROR
formatter=simple
args=('msdb.intergration.log','a',10000,20)

[handler_syslog]
class=StreamHandler
level=DEBUG
formatter=simple
args=(sys.stdout,)

[formatter_simple]
format=%(asctime)s - %(levelname)%s - %(threadName)%s - %(filename)s:%(lineno)d - %(message)s
datefmt=

Upvotes: 0

Views: 2648

Answers (1)

Nathan English
Nathan English

Reputation: 784

Simple answer to problem, the word handler should have been handlers.

Upvotes: 1

Related Questions