Skip to content

Instantly share code, notes, and snippets.

@mmahesh
Created March 7, 2014 18:05
Show Gist options
  • Save mmahesh/9416628 to your computer and use it in GitHub Desktop.
Save mmahesh/9416628 to your computer and use it in GitHub Desktop.
# Views
import logging
logger = logging.getLogger(__name__)
# Settings
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'simple': {
'format': '%(asctime)s SENDER_NAME PROGRAM_NAME: %(message)s',
'datefmt': '%b %d %H:%M:%S',
},
},
'handlers': {
'SysLog':{
'level':'DEBUG',
'class':'logging.handlers.SysLogHandler',
'formatter': 'simple',
'address':('localhost', 514)
}
},
'loggers': {
'django.request': {
'handlers': ['SysLog'],
'level': 'DEBUG',
'propagate': True,
},
'auth.views': {
'handlers': ['SysLog'],
'level': 'DEBUG',
'propagate': True,
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment