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
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 committed Oct 11, 2019
1 parent 691dd67 commit 08f5f23
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 08f5f23

Please sign in to comment.