From 5b0b83a9633211c0da49b4bcf7163d484ae80c46 Mon Sep 17 00:00:00 2001 From: zyxkad Date: Thu, 21 Mar 2024 21:58:01 -0600 Subject: [PATCH] add storage enable/disable log --- storage/storage_mount.go | 2 ++ storage/storage_webdav.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/storage/storage_mount.go b/storage/storage_mount.go index 424e40aa..d0709360 100644 --- a/storage/storage_mount.go +++ b/storage/storage_mount.go @@ -181,6 +181,7 @@ func (s *MountStorage) preServe(ctx context.Context) bool { s.working.Store(0) return false } + log.Warnf("Re-enabled storage %s", s.String()) s.supportRange.Store(supportRange) s.working.Store(1) } else { @@ -203,6 +204,7 @@ func (s *MountStorage) preServe(ctx context.Context) bool { s.supportRange.Store(supportRange) s.working.Store(1) } else { + log.Errorf("Disabled storage %s: %v", s.String(), err) s.working.Store(0) } }() diff --git a/storage/storage_webdav.go b/storage/storage_webdav.go index d0bba655..5af85c3c 100644 --- a/storage/storage_webdav.go +++ b/storage/storage_webdav.go @@ -325,6 +325,7 @@ func (s *WebDavStorage) preServe(ctx context.Context) bool { s.working.Store(0) return false } + log.Warnf("Re-enabled storage %s", s.String()) s.working.Store(1) } else { s.checkMux.RLock() @@ -345,6 +346,7 @@ func (s *WebDavStorage) preServe(ctx context.Context) bool { if err := s.checkAlive(tctx, 0); err == nil { s.working.Store(1) } else { + log.Errorf("Disabled storage %s: %v", s.String(), err) s.working.Store(0) } }()