adjust errors and logger

This commit is contained in:
Shen Junzheng
2025-04-01 13:09:59 +08:00
parent f31953c42b
commit 67c9623cea
49 changed files with 553 additions and 981 deletions

View File

@@ -8,7 +8,7 @@ import (
"regexp"
"runtime"
log "github.com/sirupsen/logrus"
"github.com/rs/zerolog/log"
)
// FindFilesWithPatterns 在指定目录下查找匹配多个正则表达式的文件
@@ -128,7 +128,7 @@ func PrepareDir(path string) error {
return err
}
} else if !stat.IsDir() {
log.Debugf("%s is not a directory", path)
log.Debug().Msgf("%s is not a directory", path)
return fmt.Errorf("%s is not a directory", path)
}
return nil