Logging messages higher than INFO level

7 views
Skip to first unread message

Ahmed Refaey

unread,
Oct 27, 2011, 5:53:29 AM10/27/11
to django...@googlegroups.com
Dear Community,

I tried to configure simple logging system like this:
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
            'simple': {
            'format': '%(levelname)s: %(message)s'
            }
    },
    'handlers': {
        'console':{
            'level':'INFO',
            'class':'logging.StreamHandler',
            'formatter': 'simple'
        }
    },
    'loggers': {
        'xlogger': {
            'handlers': ['console'],
            'level': 'INFO'
        }
    }
}

Then in any module I tred:
        logger.info('hello')
        logger.debug('world')

then I just get the INFO messages in the stdout, but I expected to see all higher level message, why?

Thanks,

Masklinn

unread,
Oct 27, 2011, 7:57:11 AM10/27/11
to django...@googlegroups.com

debug is a lower level than info, not higher (for standard `logging` levels,
critical > error > warning > info > debug).

Reply all
Reply to author
Forward
0 new messages