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 2 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 @@
Fixed server not having access to `homeserver.log` by moving the default path to `/data/homeserver.log`. Contributed by Sergio Miguéns Iglesias.
richvdh marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion docker/conf/log.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ handlers:
file:
class: logging.handlers.TimedRotatingFileHandler
formatter: precise
filename: {{ LOG_FILE_PATH or "homeserver.log" }}
filename: {{ LOG_FILE_PATH or "/data/homeserver.log" }}
Copy link
Member

Choose a reason for hiding this comment

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

the trouble with this is that it will still create an empty file in /data.

I think it would be better to surround the whole file and buffer configuration sections with {% if LOG_FILE_PATH %} (which means that the generated config will end up being similar to what we had before #9162).

when: "midnight"
backupCount: 6 # Does not include the current log file.
encoding: utf8
Expand Down