Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix logging config for the docker image (#6197)
Browse files Browse the repository at this point in the history
Turns out that loggers that are instantiated before the config is loaded get
turned off.

Also bring the logging config that is generated by --generate-config into line.

Fixes #6194.
  • Loading branch information
richvdh authored Oct 18, 2019
1 parent 1ee97cb commit 560c122
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/6197.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix logging getting lost for the docker image.
2 changes: 2 additions & 0 deletions docker/conf/log.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ loggers:
root:
level: {{ SYNAPSE_LOG_LEVEL or "INFO" }}
handlers: [console]

disable_existing_loggers: false
5 changes: 2 additions & 3 deletions synapse/config/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@
filters: [context]
loggers:
synapse:
level: INFO
synapse.storage.SQL:
# beware: increasing this to DEBUG will make synapse log sensitive
# information such as access tokens.
Expand All @@ -79,6 +76,8 @@
root:
level: INFO
handlers: [file, console]
disable_existing_loggers: false
"""
)

Expand Down

0 comments on commit 560c122

Please sign in to comment.