J
J
jozigeekforex2017-09-26 22:47:58
Django
jozigeekforex, 2017-09-26 22:47:58

Django + Gunicorn how to enable logging?

Help enable logging in Django + Gunicorn. After enabling through the standard django config and reloading gunicorn, I get an error 502. If I connect via --error-logfile, I get the same 502. Thank you.

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
        },
        'logfile': {
            'level':'DEBUG',
            'class':'logging.FileHandler',
            'filename': BASE_DIR + "/../logfile",
        },
    },
    'root': {
        'level': 'INFO',
        'handlers': ['console', 'logfile']
    },
}

docs.gunicorn.org/en/stable/settings.html

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question