Hi,

I encountered a django logging problem which can not be solved for several 
hours. My django logging setting is:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,

    'formatters': {
        'standard': {
            'format': '[%(asctime)s - %(name)s - %(levelname)s - 
%(filename)s:%(lineno)d] %(message)s'
        },
    },

    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
        },

        'file': {
            'level': 'INFO',
            'class': 'logging.handlers.RotatingFileHandler',
            'filename': '%s/logs/django.log' % (BASE_DIR),
            'maxBytes': 1024 * 1024 * 5,
            'backupCount': 5,
            'formatter': 'standard',
        },
    },

    'loggers': {
        'django': {
            'handlers': ['file', 'console'],
            'propagate': True,
            'level': 'DEBUG',
        },
    },
}


and in a .py file which django calls, i write:

logger = logging.getLogger('project.xxx.util')
logger.info('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')

I deploy django with nginx using uwsgi. When I started django, the log file 
can be created successfully, but no logs will be written to file when 
executing the py file.
Did anyone have encountered the same problem? Thanks.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4f5e4951-40b2-43ea-8264-8991ec731c6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to