Skip to content

Instantly share code, notes, and snippets.

@czue
Created July 25, 2013 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save czue/6082293 to your computer and use it in GitHub Desktop.
Save czue/6082293 to your computer and use it in GitHub Desktop.
hq log config
# MIN_LOG_LEVEL = 'DEBUG'
MIN_LOG_LEVEL = 'INFO'
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'
},
},
'handlers': {
'console': {
'level': MIN_LOG_LEVEL,
'class': 'logging.StreamHandler',
'formatter': 'simple'
},
'file': {
'level': MIN_LOG_LEVEL,
'class': 'logging.FileHandler',
'formatter': 'verbose',
'filename': DJANGO_LOG_FILE
},
'couchlog': {
'level': 'WARNING',
'class': 'couchlog.handlers.CouchHandler',
},
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
}
},
'loggers': {
'': {
'handlers': ['console', 'file', 'couchlog'],
'propagate': True,
'level': MIN_LOG_LEVEL,
},
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
'notify': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
'celery.task': {
'handlers': ['console', 'file', 'couchlog'],
'level': 'DEBUG',
'propagate': True
},
'commtrack.incoming': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': True
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment