chore: adjust log

This commit is contained in:
Skyxim 2023-01-23 11:14:45 +08:00
parent 3bace07948
commit d426db43ec
2 changed files with 4 additions and 4 deletions

View file

@ -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
}

View file

@ -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)
}
}