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

Fix logging config for the docker image #6197

Merged
merged 1 commit into from
Oct 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this and not the synapse.storage.SQL below? It feels nice to give a place to easily up the synapse log level?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it's particularly likely that we would need to up the synapse log level and not other loggers? ie, why wouldn't you do this in the root logger?

The separate config for synapse.storage.SQL exists so that if you set your logging to DEBUG (either at the root level, or just for synapse), you don't start logging all the access tokens etc that go in and out of the database.

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