summary refs log tree commit diff
path: root/nixos/modules/services/matrix/matrix-synapse-log_config.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/matrix/matrix-synapse-log_config.yaml')
-rw-r--r--nixos/modules/services/matrix/matrix-synapse-log_config.yaml25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixos/modules/services/matrix/matrix-synapse-log_config.yaml b/nixos/modules/services/matrix/matrix-synapse-log_config.yaml
new file mode 100644
index 00000000000..d85bdd1208f
--- /dev/null
+++ b/nixos/modules/services/matrix/matrix-synapse-log_config.yaml
@@ -0,0 +1,25 @@
+version: 1
+
+# In systemd's journal, loglevel is implicitly stored, so let's omit it
+# from the message text.
+formatters:
+    journal_fmt:
+        format: '%(name)s: [%(request)s] %(message)s'
+
+filters:
+    context:
+        (): synapse.util.logcontext.LoggingContextFilter
+        request: ""
+
+handlers:
+    journal:
+        class: systemd.journal.JournalHandler
+        formatter: journal_fmt
+        filters: [context]
+        SYSLOG_IDENTIFIER: synapse
+
+root:
+    level: INFO
+    handlers: [journal]
+
+disable_existing_loggers: False