From b9e9bd0471f9f794944d04182fe77efcf7434adc Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Sun, 29 Jun 2025 17:35:00 -0400 Subject: [PATCH] Print non-log errors (e.g. log list download failure) to stderr These are important and should not happen very often. --- monitor/fsstate.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monitor/fsstate.go b/monitor/fsstate.go index 3ab0d2c..5e7125d 100644 --- a/monitor/fsstate.go +++ b/monitor/fsstate.go @@ -262,6 +262,10 @@ func (s *FilesystemState) NotifyHealthCheckFailure(ctx context.Context, ctlog *l } func (s *FilesystemState) NotifyError(ctx context.Context, ctlog *loglist.Log, notifyErr error) error { + if ctlog == nil { + log.Print(notifyErr) + } + var ( now = time.Now() filePath = filepath.Join(s.errorDir(ctlog), now.Format(errorDateFormat))