[Fixed]-How to Use Django Logging with Heroku Papertrail & Waitress

1👍

Your logging configuration is set up to capture all logs under the django namespace, but in your views.pyyou are using a different namespace set with:

logger = logging.getLogger(__name__) # __name__ resolves to the name of your app.

You need to add your app (say it’s called myapp) to your logging config:

"loggers": {
    "django": {
        "handlers": ["console"],
    },
    "myapp": {
        "handlers": ["console"],
    }
}

Leave a comment