From e9929d3b5b1fedaf078537db407c19e1045d4809 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 13 Feb 2019 14:47:55 +0100 Subject: [PATCH] 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. --- debian/debian_config_common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/debian_config_common.py b/debian/debian_config_common.py index 6350b41..86e4781 100644 --- a/debian/debian_config_common.py +++ b/debian/debian_config_common.py @@ -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')