Merge branch 'log-yaml-config' into 'master'
matrix-synapse: Add support for structured logging See merge request ananace/charts!49
This commit is contained in:
commit
99c7908e13
2 changed files with 22 additions and 3 deletions
|
@ -9,8 +9,13 @@ data:
|
|||
log.yaml: |
|
||||
version: 1
|
||||
formatters:
|
||||
{{- if .Values.config.useStructuredLogging }}
|
||||
structured:
|
||||
class: synapse.logging.TerseJsonFormatter
|
||||
{{- else }}
|
||||
precise:
|
||||
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s'
|
||||
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s'
|
||||
{{- end }}
|
||||
filters:
|
||||
context:
|
||||
(): synapse.util.logcontext.LoggingContextFilter
|
||||
|
@ -18,12 +23,15 @@ data:
|
|||
handlers:
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: precise
|
||||
formatter: {{ if .Values.config.useStructuredLogging }}structured{{ else }}precise{{ end }}
|
||||
filters: [context]
|
||||
level: {{ .Values.config.logLevel | default "INFO" }}
|
||||
loggers:
|
||||
synapse:
|
||||
level: {{ .Values.config.logLevel | default "INFO" }}
|
||||
level: {{ .Values.config.logLevel | default "INFO" }}
|
||||
{{- with .Values.extraLoggers -}}
|
||||
{{ . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
root:
|
||||
level: {{ .Values.config.logLevel | default "INFO" }}
|
||||
handlers: [console]
|
||||
|
|
|
@ -140,6 +140,11 @@ config:
|
|||
extraMainListenerTypes: []
|
||||
# - consent
|
||||
|
||||
## Logging
|
||||
# use TerseJsonFormatter structured logging
|
||||
# Ref: https://matrix-org.github.io/synapse/latest/structured_logging.html
|
||||
useStructuredLogging: false
|
||||
|
||||
## Specify arbitrary Synapse configuration here;
|
||||
## Ref: https://github.com/matrix-org/synapse/blob/develop/docs/sample_config.yaml
|
||||
##
|
||||
|
@ -154,6 +159,12 @@ extraConfig: {}
|
|||
# - syd.example.com
|
||||
# dynamic_thumbnails: true
|
||||
|
||||
## Specify additional loggers configutation here;
|
||||
## Ref: https://matrix-org.github.io/synapse/latest/structured_logging.html
|
||||
extraLoggers: {}
|
||||
# synapse.storage.SQL:
|
||||
# level: WARNING
|
||||
|
||||
## Specify arbitrary - secret - Synapse configuration here;
|
||||
## These values will be stored in secrets instead of configmaps
|
||||
## Ref: https://github.com/matrix-org/synapse/blob/develop/docs/sample_config.yaml
|
||||
|
|
Loading…
Reference in a new issue