[MM-65738] Clarify main logger shutdown timeout diagnostic (#38101)

The shutdown error only said "Error shutting down main logger" with no
hint at the cause, which is confusing when the real reason is an
unreachable log target (e.g. a remote TCP endpoint) blocking the
flush. Point the operator at the connection error logs for the
affected target instead.
This commit is contained in:
Ben Schumacher
2026-08-26 09:51:39 +02:00
committed by GitHub
parent f21b0299d3
commit e22a25ab85
+1 -1
View File
@@ -863,7 +863,7 @@ func (s *Server) Shutdown() {
timeoutCtx, timeoutCancel := context.WithTimeout(context.Background(), time.Second*15)
defer timeoutCancel()
if err = s.Log().ShutdownWithTimeout(timeoutCtx); err != nil {
fmt.Fprintf(os.Stderr, "Error shutting down main logger: %v", err)
fmt.Fprintf(os.Stderr, "Error shutting down main logger (this can happen if a log target, e.g. a remote TCP endpoint, is unreachable; check preceding connection error logs for the affected target): %v\n", err)
}
}