mirror of
https://github.com/jetkvm/kvm.git
synced 2026-05-21 05:20:35 +00:00
e56304b7f5
The supervisor process in cmd/main.go used fmt.Printf for operational messages (error dump handling, version mismatch fatal), while the KVM application uses zerolog throughout. The plain-text output mixed with zerolog-formatted output on the same stdout stream, breaking log parsability for anyone collecting logs via journald or similar. Replace the five fmt.Printf calls in createErrorDump() and the version mismatch fatal in main() with a supervisorLogger using the existing logging.GetSubsystemLogger infrastructure. Add "supervisor" to subsystemDefaultLevels at InfoLevel so the "error dump saved" message is not suppressed by the default ErrorLevel threshold. Intentionally left unchanged: - Version flag output (fmt.Println) — CLI output, not logging - Crash info written to log file (fmt.Fprintf) — file I/O - fmt.Sprintf calls — string formatting, not logging - setProcTitle — process title, not logging Signed-off-by: Alex Howells <alex@howells.me>