How to use Django logging with gunicorn

后端 未结 3 2051
生来不讨喜
生来不讨喜 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条回答
  •  野的像风
    2021-02-08 10:37

    I got a response on GitHub:

    https://github.com/benoitc/gunicorn/issues/708

    Since you have passed disable_existing_loggers the Gunicorn loggers are disabled when Django loads your logging configuration. If you are setting this because you want to disable some default Django logging configuration, make sure you add back the gunicorn loggers, gunicorn.error and gunicorn.access with whatever handlers you want.

提交回复
热议问题