1
運行gunicorn當我試圖這樣的日誌格式:日誌格式獲得請求頭中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
該問題與我如何請求連接請求標頭有關。
有沒有人有記錄在gunicorn格式的請求標題的例子?