[GH-ISSUE #10836] Add option to log directly to journald and not stdout #32877

Open
opened 2026-04-22 14:47:18 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @axelkar on GitHub (May 23, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10836

Currently running journalctl gives me for example these:

May 23 20:27:02 MyMachine ollama[67972]: time=2025-05-23T20:27:02.016+03:00 level=INFO source=gpu.go:217 msg="looking for compatible GPUs"
May 23 20:27:02 MyMachine ollama[67972]: time=2025-05-23T20:27:02.018+03:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory"

By logging directly to journald, you gain better observability. A major advantage is that log levels are written to the journald-native PRIORITY field, where as currently all log messages have PRIORITY=6 (info). The second log line should be yellow because it represents a warning, but isn't because its PRIORITY field is set to 6.

https://pkg.go.dev/github.com/systemd/slog-journal

Originally created by @axelkar on GitHub (May 23, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10836 Currently running `journalctl` gives me for example these: ``` May 23 20:27:02 MyMachine ollama[67972]: time=2025-05-23T20:27:02.016+03:00 level=INFO source=gpu.go:217 msg="looking for compatible GPUs" May 23 20:27:02 MyMachine ollama[67972]: time=2025-05-23T20:27:02.018+03:00 level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory" ``` By logging directly to journald, you gain better observability. A major advantage is that log levels are written to the journald-native PRIORITY field, where as currently all log messages have PRIORITY=6 (info). The second log line should be yellow because it represents a warning, but isn't because its PRIORITY field is set to 6. https://pkg.go.dev/github.com/systemd/slog-journal
GiteaMirror added the feature request label 2026-04-22 14:47:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#32877