debian: configure journald filters and formatter (#30613)

In order to get logs:
* on par with syslog for the message,
* with structured fields for requests/tenants informations.
This commit is contained in:
Benjamin Dauvergne 2019-02-13 14:47:55 +01:00
parent 7dbb469a4f
commit e9929d3b5b
1 changed files with 2 additions and 0 deletions

View File

@ -168,6 +168,8 @@ if os.path.exists('/run/systemd/journal/socket'):
else:
LOGGING['handlers']['journald'] = {
'class': 'hobo.journal.JournalHandler',
'filters': ['request_context'],
'formatter': 'syslog',
}
LOGGING['loggers']['']['handlers'].remove('syslog')
LOGGING['loggers']['']['handlers'].append('journald')