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

Commit

Permalink
Fix docker image to not log at /homeserver.log (#10045)
Browse files Browse the repository at this point in the history
Fixes #9970

Signed-off-by: Sergio Miguéns Iglesias [email protected]
  • Loading branch information
lonyelon authored May 24, 2021
1 parent 057ce7b commit 22a8838
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/10045.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug introduced in Synapse 1.33.0 which caused a `Permission denied: '/homeserver.log'` error when starting Synapse with the generated log configuration. Contributed by Sergio Miguéns Iglesias.
4 changes: 3 additions & 1 deletion docker/conf/log.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ formatters:
{% endif %}

handlers:
{% if LOG_FILE_PATH %}
file:
class: logging.handlers.TimedRotatingFileHandler
formatter: precise
filename: {{ LOG_FILE_PATH or "homeserver.log" }}
filename: {{ LOG_FILE_PATH }}
when: "midnight"
backupCount: 6 # Does not include the current log file.
encoding: utf8
Expand All @@ -29,6 +30,7 @@ handlers:
# be written to disk.
capacity: 10
flushLevel: 30 # Flush for WARNING logs as well
{% endif %}

console:
class: logging.StreamHandler
Expand Down

0 comments on commit 22a8838

Please sign in to comment.