From bd13de2b39d7e2d633a35b33ef37184552595f68 Mon Sep 17 00:00:00 2001 From: jflyfox Date: Mon, 1 Mar 2021 17:50:02 +0800 Subject: [PATCH] improve package internal/intlog --- os/gfsnotify/gfsnotify_watcher.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/os/gfsnotify/gfsnotify_watcher.go b/os/gfsnotify/gfsnotify_watcher.go index 52c342305..421b40a59 100644 --- a/os/gfsnotify/gfsnotify_watcher.go +++ b/os/gfsnotify/gfsnotify_watcher.go @@ -47,8 +47,7 @@ func (w *Watcher) AddOnce(name, path string, callbackFunc func(event *Event), re if err := w.watcher.Add(subPath); err != nil { intlog.Error(err) } else { - // It uses `Errorf` as it needs trace stack information here. - intlog.Errorf("watcher adds monitor for: %s", subPath) + intlog.Printf("watcher adds monitor for: %s", subPath) } } } @@ -95,8 +94,7 @@ func (w *Watcher) addWithCallbackFunc(name, path string, callbackFunc func(event if err := w.watcher.Add(path); err != nil { intlog.Error(err) } else { - // It uses `Errorf` as it needs trace stack information here. - intlog.Errorf("watcher adds monitor for: %s", path) + intlog.Printf("watcher adds monitor for: %s", path) } // Add the callback to global callback map. callbackIdMap.Set(callback.Id, callback)