From 5827ec3bcb5e242d50c94d5ea7ed11cbf1eceb43 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Sun, 11 Apr 2021 21:11:55 +0200
Subject: [PATCH] matrix: Simplify log_config.yaml

---
 roles/matrix/files/log_config.yaml | 38 ------------------------------
 1 file changed, 38 deletions(-)

diff --git a/roles/matrix/files/log_config.yaml b/roles/matrix/files/log_config.yaml
index abbaa6261..35142c553 100644
--- a/roles/matrix/files/log_config.yaml
+++ b/roles/matrix/files/log_config.yaml
@@ -1,66 +1,28 @@
-# Log configuration for Synapse.
-#
-# This is a YAML file containing a standard Python logging configuration
-# dictionary. See [1] for details on the valid settings.
-#
-# [1]: https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
-
 version: 1
 
 formatters:
-    precise:
-        format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
     journal_fmt:
         format: '%(name)s: [%(request)s] %(message)s'
 
 handlers:
-    # Default to buffering writes to log file for efficiency. This means that
-    # will be a delay for INFO/DEBUG logs to get written, but WARNING/ERROR
-    # logs will still be flushed immediately.
     buffer:
         class: logging.handlers.MemoryHandler
         target: journal
-        # The capacity is the number of log lines that are buffered before
-        # being written to disk. Increasing this will lead to better
-        # performance, at the expensive of it taking longer for log lines to
-        # be written to disk.
         capacity: 10
         flushLevel: 30  # Flush for WARNING logs as well
 
-    # A handler that writes logs to stderr. Unused by default, but can be used
-    # instead of "buffer" and "file" in the logger handlers.
-    console:
-        class: logging.StreamHandler
-        formatter: precise
-
     journal:
         class: systemd.journal.JournalHandler
         formatter: journal_fmt
         SYSLOG_IDENTIFIER: synapse
 
 loggers:
-    synapse.storage.SQL:
-        # beware: increasing this to DEBUG will make synapse log sensitive
-        # information such as access tokens.
-        level: INFO
-
     twisted:
-        # We send the twisted logging directly to the file handler,
-        # to work around https://github.com/matrix-org/synapse/issues/3471
-        # when using "buffer" logger. Use "console" to log to stderr instead.
         handlers: [journal]
         propagate: false
 
 root:
     level: INFO
-
-    # Write logs to the `buffer` handler, which will buffer them together in memory,
-    # then write them to a file.
-    #
-    # Replace "buffer" with "console" to log to stderr instead. (Note that you'll
-    # also need to update the configuation for the `twisted` logger above, in
-    # this case.)
-    #
     handlers: [buffer]
 
 disable_existing_loggers: false
-- 
GitLab