From ad2312b7155ec255210cba7beb8846665e2d81e1 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 27 Aug 2023 09:28:57 +0200 Subject: [PATCH] matrix stuff: make journal usable again --- bundles/matrix-synapse/files/log.yaml | 18 ++++++++++++++++-- bundles/mautrix-telegram/files/config.yaml | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/bundles/matrix-synapse/files/log.yaml b/bundles/matrix-synapse/files/log.yaml index de4ff6b..7bb4ef2 100644 --- a/bundles/matrix-synapse/files/log.yaml +++ b/bundles/matrix-synapse/files/log.yaml @@ -1,10 +1,25 @@ version: 1 formatters: + precise: + format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' journal: format: '%(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' handlers: + file: + class: logging.handlers.TimedRotatingFileHandler + formatter: precise + filename: /var/log/matrix-synapse/homeserver.log + when: midnight + backupCount: 1 # Does not include the current log file. + encoding: utf8 + buffer: + class: synapse.logging.handlers.PeriodicallyFlushingMemoryHandler + target: file + capacity: 10 + flushLevel: 30 # Flush immediately for WARNING logs and higher + period: 5 console: class: logging.StreamHandler formatter: journal @@ -15,7 +30,6 @@ loggers: root: level: WARNING - - handlers: [console] + handlers: [buffer] disable_existing_loggers: false diff --git a/bundles/mautrix-telegram/files/config.yaml b/bundles/mautrix-telegram/files/config.yaml index 0a3ad1c..1fbe165 100644 --- a/bundles/mautrix-telegram/files/config.yaml +++ b/bundles/mautrix-telegram/files/config.yaml @@ -180,7 +180,7 @@ logging: telethon: level: INFO aiohttp: - level: INFO + level: WARNING root: level: INFO handlers: [console]