[PR #2206] [MERGED] fix(log): write each log category to its own file #8116

Closed
opened 2026-04-20 18:02:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2206
Author: @kolaente
Created: 2/8/2026
Status: Merged
Merged: 2/8/2026
Merged by: @kolaente

Base: mainHead: fix-log-file-per-category


📝 Commits (3)

  • d5feb1c test: add failing test for per-category log file creation
  • 9c06625 fix(log): write each log category to its own file
  • ebf4f84 fix(log): write echo logger to http.log

📊 Changes

6 files changed (+35 additions, -8 deletions)

View changed files

📝 pkg/log/echo_logger.go (+1 -1)
📝 pkg/log/logging.go (+4 -4)
📝 pkg/log/logging_test.go (+27 -0)
📝 pkg/log/mail_logger.go (+1 -1)
📝 pkg/log/watermill_logger.go (+1 -1)
📝 pkg/log/xorm_logger.go (+1 -1)

📄 Description

Previously, makeLogHandler() hardcoded "standard" as the logfile name passed to getLogWriter(), causing all log categories (database, http, events, mail) to write to standard.log instead of their own files.

Add a logfile parameter to makeLogHandler() so each caller specifies its category name, producing database.log, http.log, echo.log, events.log, and mail.log as expected.

Fixes https://github.com/go-vikunja/vikunja/issues/2177


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2206 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 2/8/2026 **Status:** ✅ Merged **Merged:** 2/8/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix-log-file-per-category` --- ### 📝 Commits (3) - [`d5feb1c`](https://github.com/go-vikunja/vikunja/commit/d5feb1cdb7424e7e1f811940c6c6cbcc5b8160d3) test: add failing test for per-category log file creation - [`9c06625`](https://github.com/go-vikunja/vikunja/commit/9c066258c5403c0d209d6f73c98fc99c9b42be63) fix(log): write each log category to its own file - [`ebf4f84`](https://github.com/go-vikunja/vikunja/commit/ebf4f843d6c0896d225db6a8f71212e628b6c97a) fix(log): write echo logger to http.log ### 📊 Changes **6 files changed** (+35 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `pkg/log/echo_logger.go` (+1 -1) 📝 `pkg/log/logging.go` (+4 -4) 📝 `pkg/log/logging_test.go` (+27 -0) 📝 `pkg/log/mail_logger.go` (+1 -1) 📝 `pkg/log/watermill_logger.go` (+1 -1) 📝 `pkg/log/xorm_logger.go` (+1 -1) </details> ### 📄 Description Previously, `makeLogHandler()` hardcoded "standard" as the logfile name passed to `getLogWriter()`, causing all log categories (`database`, `http`, `events`, `mail`) to write to `standard.log` instead of their own files. Add a logfile parameter to `makeLogHandler()` so each caller specifies its category name, producing `database.log`, `http.log`, `echo.log`, `events.log`, and `mail.log` as expected. Fixes https://github.com/go-vikunja/vikunja/issues/2177 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 18:02:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#8116