Change info log to error and remove noisy log

This commit is contained in:
Bill Thiede 2023-02-25 10:45:55 -08:00
parent 23a63911de
commit 093cc0cb56

View File

@ -15,7 +15,7 @@ import (
)
var (
root = flag.String("root", filepath.Join(os.Getenv("HOME"), "Maildir/"),
root = flag.String("root", filepath.Join(os.Getenv("HOME"), "Maildir"),
"root directory to watch")
poll = flag.Duration("poll", time.Second*time.Duration(10),
"poll interval between new file check")
@ -128,7 +128,7 @@ func (mc *mailCounter) ServeHTTP(w http.ResponseWriter, r *http.Request) {
enc := json.NewEncoder(w)
err := enc.Encode(c)
if err != nil {
glog.Infoln("Error printing JSON:", err)
glog.Errorln("Error printing JSON:", err)
}
}
@ -195,7 +195,6 @@ func (mc *mailCounter) fillNeedUpdate() error {
// glog.Infoln("END fillNeedUpdate", mc.needUpdate)
// }()
return filepath.Walk(mc.root, func(path string, info os.FileInfo, err error) error {
glog.Infof("path %s", path)
if err != nil {
return err
}