A basic logging tutorial A more advanced logging tutorial 15 An example dictionary-based configuration Below is an example of a logging configuration dictionary - it’s taken from the documentation on the Django project. This dictionary is passed to$_{dictConfig()}$ to put the configuration into effect: 23 LOGGING ={ 'version':1, 'disable_existing_loggers ': True , 'formatters': { 'verbose': { 'format':' %(levelname)s %(asctime)s %(module)s %(process)d %(thread)d ↪ → %(message)s ' }, 'simple': { 'format':' %(levelname)s %(message)s ' }, }, 'filters': { 'special': { '() ':'project.logging.SpecialFilter ', 'foo':'bar', } }, 'handlers': { 'null ': { 'level ':'DEBUG', 'class':'django.utils.log.NullHandler ', }, 'console':{ 'level ':'DEBUG', 'class':'logging.StreamHandler ', 'formatter':'simple' }, 'mail_admins': { 'level ':'ERROR', 'class':'django.utils.log.AdminEmailHandler ', 'filters': ['special'] } }, 'loggers': { 'django': { 'handlers':['null '], 'propagate': True , 'level ':'INFO ', }, 'django.request ': { 'handlers': ['mail_admins'], 'level ':'ERROR', 'propagate': False , }, 'myproject.custom ': { 'handlers': ['console','mail_admins'], 'level ':'INFO ', 'filters': ['special'] } } }