diff --git a/charts/matrix/templates/configmap-homeserver.yaml b/charts/matrix/templates/configmap-homeserver.yaml index c2b65bd..f5f0ac6 100644 --- a/charts/matrix/templates/configmap-homeserver.yaml +++ b/charts/matrix/templates/configmap-homeserver.yaml @@ -3,4 +3,5 @@ kind: ConfigMap metadata: name: matrix-configuration-homeserver data: - homeserver.yaml: {{- .Values.homeserverConfiguration | toYaml | indent 1 }} \ No newline at end of file + homeserver.yaml: {{- .Values.homeserverConfiguration | toYaml | indent 1 }} + log.config: {{- .Values.logConfiguration | toYaml | indent 1 }} \ No newline at end of file diff --git a/charts/matrix/values.yaml b/charts/matrix/values.yaml index bc50485..661c048 100644 --- a/charts/matrix/values.yaml +++ b/charts/matrix/values.yaml @@ -30,3 +30,33 @@ configuration: homeserverConfiguration: |- "overlay_me" + +logConfiguration: |- + version: 1 + formatters: + precise: + format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' + handlers: + file: + class: logging.handlers.TimedRotatingFileHandler + formatter: precise + filename: /tmp/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: precise + loggers: + synapse.storage.SQL: + level: INFO + root: + level: INFO + handlers: [buffer] + disable_existing_loggers: false \ No newline at end of file