Skip to content

Instantly share code, notes, and snippets.

@ikeikeikeike
Created March 13, 2012 11:46
Show Gist options
  • Save ikeikeikeike/2028340 to your computer and use it in GitHub Desktop.
Save ikeikeikeike/2028340 to your computer and use it in GitHub Desktop.
django logging fluentd
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': "%(asctime)s %(levelname)s: %(message)s [in %(pathname)s:%(lineno)d]"
},
},
'handlers': {
'fluentinfo':{
'level':'INFO',
'class':'fluent.handler.FluentHandler',
'formatter': 'verbose',
'tag':'app.info',
'host':'localhost',
'port':24224,
# 'timeout':3.0,
# 'verbose': False
},
'fluentdebug':{
'level':'DEBUG',
'class':'fluent.handler.FluentHandler',
'formatter': 'verbose',
'tag':'app.debug',
'host':'localhost',
'port':24224,
# 'timeout':3.0,
'verbose': True
},
},
'loggers': {
'app.debug': {
'handlers': ['fluentdebug'],
'level': 'DEBUG',
'propagate': True,
},
'app.info': {
'handlers': ['fluentinfo'],
'level': 'DEBUG',
'propagate': True,
},
}
}
@dennisbyrne
Copy link

Change DEBUG to INFO on line 39.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment