mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-26 21:27:40 -05:00
[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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user