Empty Log Message (ARCH5163)
Key go.logging.empty-log-message · Severity info · Category logging
A log call with an empty or whitespace-only message produces noise with no diagnostic value. Every log line should carry meaningful text describing what happened.
Incorrect
Section titled “Incorrect”func tick(log *slog.Logger, n int) { log.Info("", "count", n)}Correct
Section titled “Correct”func tick(log *slog.Logger, n int) { log.Info("tick processed", "count", n)}Give the log call a clear, meaningful message describing the event.