Commit 175637c6 by Daniel Friedman

Silence the elasticsearch.trace logs

parent dd3d54de
......@@ -234,6 +234,10 @@ LOGGING = {
'class': 'logging.StreamHandler',
'stream': stderr,
},
'null': {
'level': 'DEBUG',
'class': 'logging.NullHandler'
}
},
'loggers': {
'django': {
......@@ -246,6 +250,21 @@ LOGGING = {
'level': 'DEBUG',
'propagate': True
},
# See https://elasticutils.readthedocs.io/en/latest/debugging.html
# INFO-level logs tell us when nodes fail and are resurrected.
'elasticsearch': {
'handlers': ['console'],
'level': 'WARNING'
},
# elasticsearch.trace logs are fired for every single request
# with an INFO or DEBUG level. They're noisy and not terribly
# userful for debugging, so we'll just propagate them to the
# 'elasticsearch' log bucket which only accepts 'WARNING'
# level logs.
'elasticsearch.trace': {
'handlers': ['null'],
'propagate': False
}
},
}
########## END LOGGING CONFIGURATION
......
......@@ -14,6 +14,9 @@ DATABASES = {
},
}
# Silence elasticsearch during tests
LOGGING['loggers']['elasticsearch']['handlers'] = ['null']
INSTALLED_APPS += (
'django_nose',
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment