﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34236	Django logging when in production with Gunnicron	Derek	nobody	"I was trying to configure access logs using Django logging as per documentation https://docs.djangoproject.com/en/4.1/howto/logging/
I wanted to collect all access logs from INFO. It works perfectly when in development mode. However, when I switched to Gunnicron in production, I got only warnings and higher status logs. 

After a bit of searching, I have found this ticket below, which kind of summarises this behaviour.
https://code.djangoproject.com/ticket/33897
I think the documentation should say that once in production with Gunnicorn, there are no access logs with INFO status from the Django logger.

My logging configuration is as follow:


{{{
LOGGING = {
    'version': 1,  # the dictConfig format version
    'disable_existing_loggers': False,  # retain the default loggers

    'handlers': {
       'rotatingFile': {
            'level': LOG_LEVEL,
            'class': 'logging.handlers.RotatingFileHandler',
            'formatter': 'verbose',
            'maxBytes': LOG_MAX_SIZE,
            'backupCount': LOG_NUMBER_OF_FILES,
            'filename': LOG_LOCATION,
        }
    },
    'loggers': {
        
        'root': {
            'handlers': ['rotatingFile'],
            'level': LOG_LEVEL,
        },
        
    },
    'formatters': {
        'verbose': {
            'format': '{asctime} {levelname} {name} {module} {process:d} {thread:d} {message}',
            'style': '{',
        },
    },
}}}
"	Uncategorized	new	Documentation	4.1	Normal		logging		Unreviewed	0	0	0	0	1	0
