I'm having a bit of an issue with logging. I did this (a trick I picked
up from a site to enable logging under uwsgi):
def main(global_config, **settings):
""" Main WSGI application.
logging.config = %(here)s/development.ini
# Begin logging configuration
keys = root,sqlalchemy
keys = console
keys = generic
level = DEBUG
handlers = console
level = INFO
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s]
# End logging configuration
Now, if I include logging.config.fileConfig() line in __init__ I have to
specifically enable loggers for namespaces in development.ini, the root
logger won't catch all. For example, I've disabled debugtoolbar in dev,
and in case of exceptions I get nothing on the console unless I add a
[logger_waitress] section (with logger key set, qualname, etc...).
If I remove that line (basically, disable logging configuration),
logging under Waitress shows root logger catching all (that is not
What am I doing wrong?
.oO V Oo.
Be Happy! ;)