[Django]-Django application not logging request info in production log file when deployed with gunicorn and Nginx

0👍

'django.request': {
        'handlers': ['console', 'file', '**reqlog**'],
        'level': 'INFO',
        'propagate': False}

after adding reqlog to django request handlers, it works for me.

👤Gagan

-1👍

import logging.config


logging.config.dictConfig({
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'console': {
            'format': '%(name)-12s %(levelname)-8s %(message)s'
        }
    },
    'handlers': {
        'console': {
            'class': 'logging.StreamHandler',
            'formatter': 'console'
        },

    },
    'loggers': {
        '': {
            'level': 'DEBUG',
            'handlers': ['console']
        }
    }
})

#Try This

Leave a comment