How to use Django logging with gunicorn

后端 未结 3 2048
生来不讨喜
生来不讨喜 2021-02-08 10:10

I have a Django 1.6 site running with gunicorn, managed by supervisor. During tests and runserver I have logging on the console, but with gunicorn the statements don\'t show up

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-08 10:33

    In /etc/supervisor/conf.d/your-app.confyou should set log paths:

    stdout_logfile=/var/log/your-app.log
    stderr_logfile=/var/log/your-app.log
    

提交回复
热议问题