【发布时间】:2013-12-18 23:30:47
【问题描述】:
我在运行 gunicorn 时正在尝试这种日志格式:
--access-logformat "[dev.api] %(h)s %(l)s %(u)s %(t)s .%(r)s. %(s)s %(b)s .%(f)s. .%(a)s. conn=\"%{Connection}i\""
根据文档@http://docs.gunicorn.org/en/latest/configure.html,这看起来不错
但是,我收到以下错误:
File "lib/python2.7/site-packages/gunicorn/glogging.py", line 274, in access
self.access_log.info(self.cfg.access_log_format % safe_atoms)
TypeError: not enough arguments for format string
问题与我如何请求 Connection 请求标头有关。
有人有以 gunicorn 格式记录请求标头的示例吗?
【问题讨论】:
标签: gunicorn