Logger / I get all messages 2 times

ASh anton.shishkov at gmail.com
Thu Oct 23 15:59:05 CEST 2008


Hi,

I have this source:

import logging
import logging.config

logging.config.fileConfig("logging.properties")
log = logging.getLogger("qname")
log.debug("message")

------------------- OUTPUT
DEBUG logger_test:8:  message
DEBUG logger_test:8:  message

------- FILE CONFIG
[formatters]
keys: detailed

[handlers]
keys: console

[loggers]
keys: root, engine

[formatter_detailed]
format: %(levelname)s %(module)s:%(lineno)d:  %(message)s

[handler_console]
class: StreamHandler
args: []
formatter: detailed

[logger_root]
level: ERROR
handlers: console

[logger_engine]
level: DEBUG
qualname: qname
handlers: console

---------------

Why do I get the log 2 times?




More information about the Python-list mailing list