I\'m having no luck finding any information on setting up syslog logging with Django 1.3 dictionary configuration. The Django documents don\'t cover syslog and the python docum
This works for me (on default debian).
/dev/log
is the secret to ensure there is no attempt to use the network.''
equates to the root logger so will catch most stuffIn settings.py:
LOGGING = {
'version': 1,
'handlers': {
'syslog':{
'address': '/dev/log',
'class': 'logging.handlers.SysLogHandler'
}
},
'loggers': {
'': {
'handlers': ['syslog'],
'level': 'DEBUG',
}
}
}
in the app:
import logging
logging.info("freakout info")
provides:
john:/var/log$ sudo tail -1 user.log
Dec 14 17:15:52 john freakout info