Logging in Django on Heroku not appearing

后端 未结 4 2354
借酒劲吻你
借酒劲吻你 2021-02-19 05:22

I have created an app on Heroku and I push my Django app to it.

I monitor the logs using heroku logs --tail to see them in real time.

Then, in my

4条回答
  •  星月不相逢
    2021-02-19 05:53

    I think if you drop a logger.error you would see something.

    I had the same problem and it turns out heroku's settings tool breaks the pre-existing LOGGING setup. The logger you are using is not registered with django but is making its own way to the console using python's standard logging system.

    Try doing:

    django_heroku.settings(locals(), logging=False)
    

    Or better yet, don't use it at all anymore since this package is no longer maintained anyway.

提交回复
热议问题