From d426db43ec97aefb02b3f4b44a500be60ce8bd16 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Mon, 23 Jan 2023 11:14:45 +0800 Subject: [PATCH] chore: adjust log --- component/resource/fetcher.go | 4 ++-- hub/executor/executor.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/component/resource/fetcher.go b/component/resource/fetcher.go index df8e9a54..4b905c7f 100644 --- a/component/resource/fetcher.go +++ b/component/resource/fetcher.go @@ -57,7 +57,7 @@ func (f *Fetcher[V]) Initial() (V, error) { f.UpdatedAt = &modTime isLocal = true if f.interval != 0 && modTime.Add(f.interval).Before(time.Now()) { - log.Infoln("[Provider] %s not updated for a long time, force refresh", f.Name()) + log.Warnln("[Provider] %s not updated for a long time, force refresh", f.Name()) forceUpdate = true } } else { @@ -162,7 +162,7 @@ func (f *Fetcher[V]) pullLoop() { case <-f.ticker.C: elm, same, err := f.Update() if err != nil { - log.Warnln("[Provider] %s pull error: %s", f.Name(), err.Error()) + log.Errorln("[Provider] %s pull error: %s", f.Name(), err.Error()) continue } diff --git a/hub/executor/executor.go b/hub/executor/executor.go index 16a194c2..9082f856 100644 --- a/hub/executor/executor.go +++ b/hub/executor/executor.go @@ -223,11 +223,11 @@ func loadProvider(pv provider.Provider) { switch pv.Type() { case provider.Proxy: { - log.Warnln("initial proxy provider %s error: %v", (pv).Name(), err) + log.Errorln("initial proxy provider %s error: %v", (pv).Name(), err) } case provider.Rule: { - log.Warnln("initial rule provider %s error: %v", (pv).Name(), err) + log.Errorln("initial rule provider %s error: %v", (pv).Name(), err) } }