【发布时间】:2017-03-23 05:07:00
【问题描述】:
我使用 gunicorn + nginx + supervisor +django 。我得到了这个日志:
[2016-11-09 19:27:53 +0000] [14676] [DEBUG] GET /audit/list_pay/
这是我的启动 gunicorn cmd:
gunicorn myproject.wsgi:application --workers 4 --bind 0.0.0.0:8001 --log-level debug --log-file=-
我的主管配置:
[program:cmdb]
command= /usr/local/cmdb/cmdb_gunicorn_start
directory=/usr/local/cmdb
startsecs=0
stopwaitsecs=10
autostart=false
autorestart=false
stdout_logfile=/data/logs/cmdb_gunicorn.log
redirect_stderr=true
我把--access-logformat "%(h)s %(l)s %(u)s %(t)s %(s)s %(b)s"附加了gunicorn start cmd,但它不起作用。
我尝试了另一个 gunicorn 日志参数,但它们不起作用。我不知道可以使用哪些记录器参数。
我应该怎么做才能获得更多记录器信息。
【问题讨论】:
标签: django logging gunicorn supervisord formatter