quintodrome/conf
Tom Boucher aa93911991
feat(server): add syslog priority prefixes for systemd-journald (#5192)
* fix: add syslog priority prefixes for systemd-journald

When running under systemd, all log messages were assigned priority 3
(error) by journald because navidrome wrote plain text to stderr without
syslog priority prefixes.

Add a journalFormatter that wraps the existing logrus formatter and
prepends <N> syslog priority prefixes (RFC 5424) to each log line.
The formatter is automatically enabled when the JOURNAL_STREAM
environment variable is set (indicating the process is managed by
systemd).

Priority mapping:
- Fatal/Panic → <2>/<0> (crit/emerg)
- Error → <3> (err)
- Warn → <4> (warning)
- Info → <6> (info)
- Debug/Trace → <7> (debug)

Fixes #5142

* test: refactor journalFormatter tests to use Ginkgo and DescribeTable

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-03-15 14:14:05 -04:00
..
buildtags feat(server): implement FTS5-based full-text search (#5079) 2026-02-21 17:52:42 -05:00
configtest Fix background images when BaseURL is specified 2022-11-29 14:48:05 -05:00
mime fix(ui): service worker does not load new version of ui (#3402) 2024-10-16 21:39:14 -04:00
testdata feat: rename "reverse proxy authentication" to "external authentication" (#4418) 2025-12-02 12:01:48 -05:00
configuration.go feat(server): add syslog priority prefixes for systemd-journald (#5192) 2026-03-15 14:14:05 -04:00
configuration_test.go feat(server): add ExtAuth logout URL configuration (#5074) 2026-02-23 20:28:38 -05:00
export_test.go feat(server): add ExtAuth logout URL configuration (#5074) 2026-02-23 20:28:38 -05:00