Auto-create logs-directory #1213

Closed
opened 2022-07-18 12:26:46 +00:00 by xeruf · 3 comments

Enabled file logs, got this:

2022-07-18T12:24:46.897281143Z: CRITICAL	▶ log/GetLogWriter 001 Could not create logfile /app/vikunja/logs/database.log: open /app/vikunja/logs/database.log: no such file or directory

I am expecting the default directory to work ;)

Enabled file logs, got this: 2022-07-18T12:24:46.897281143Z: CRITICAL ▶ log/GetLogWriter 001 Could not create logfile /app/vikunja/logs/database.log: open /app/vikunja/logs/database.log: no such file or directory I am expecting the default directory to work ;)
konrad added the
kind/feature
label 2022-07-18 13:27:12 +00:00
Contributor

Is this an issue due to os.MkDir instead of os.MkDirAll ?
the log directory should be autocreated.

Is this an issue due to `os.MkDir` instead of `os.MkDirAll` ? the log directory should be autocreated.
Owner

I think we don't create the directory at all.

PRs welcome!

I think we don't create the directory at all. PRs welcome!
Contributor

Yes, the directory is created at f065dcf4ad/pkg/log/logging.go (L60)
but as I said, it should better be MkdirAll. I will add added this to my PR #1606 concerning the log package.

Yes, the directory is created at https://kolaente.dev/vikunja/api/src/commit/f065dcf4adf5bdc54810cac6529506c3e8732366/pkg/log/logging.go#L60 but as I said, it should better be `MkdirAll`. I ~~will add~~ added this to my PR #1606 concerning the log package.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1213
No description provided.