我有一个标准的日志记录配置,如:
[loggers]
keys = root, quoting, sqlalchemy
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[logger_quoting]
level = INFO
handlers =
qualname = quoting
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
金字塔似乎忽略了它,在使用pserve --reload development.ini
运行时给了我关于stdout的所有内容。
日志表示一页加载。我试图过滤掉SQLAlchemy的内容,但想知道我哪里出错了
答案 0 :(得分:1)
我认为SQLAlchemy引擎配置上的echo=True
将转储到stdout并忽略日志记录配置。这可能就是你所看到的。