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,
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/rcMu0GvIAMAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment