Skip to content

Commit

Permalink
add: default log configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
deB4SH committed Sep 17, 2024
1 parent 86ff59b commit 5fee252
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion charts/matrix/templates/configmap-homeserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: ConfigMap
metadata:
name: matrix-configuration-homeserver
data:
homeserver.yaml: {{- .Values.homeserverConfiguration | toYaml | indent 1 }}
homeserver.yaml: {{- .Values.homeserverConfiguration | toYaml | indent 1 }}
log.config: {{- .Values.logConfiguration | toYaml | indent 1 }}
30 changes: 30 additions & 0 deletions charts/matrix/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5fee252

Please sign in to comment.