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

Commit 22a8838

Browse files
authored
Fix docker image to not log at /homeserver.log (#10045)
Fixes #9970 Signed-off-by: Sergio Miguéns Iglesias [email protected]
1 parent 057ce7b commit 22a8838

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changelog.d/10045.docker

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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.

docker/conf/log.config

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ formatters:
99
{% endif %}
1010

1111
handlers:
12+
{% if LOG_FILE_PATH %}
1213
file:
1314
class: logging.handlers.TimedRotatingFileHandler
1415
formatter: precise
15-
filename: {{ LOG_FILE_PATH or "homeserver.log" }}
16+
filename: {{ LOG_FILE_PATH }}
1617
when: "midnight"
1718
backupCount: 6 # Does not include the current log file.
1819
encoding: utf8
@@ -29,6 +30,7 @@ handlers:
2930
# be written to disk.
3031
capacity: 10
3132
flushLevel: 30 # Flush for WARNING logs as well
33+
{% endif %}
3234

3335
console:
3436
class: logging.StreamHandler

0 commit comments

Comments
 (0)