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

Fix docker image to not log at /homeserver.log #10045

Merged
merged 4 commits into from
May 24, 2021
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/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