improve package internal/intlog

This commit is contained in:
jflyfox 2021-03-01 17:50:02 +08:00
parent d0f649b328
commit bd13de2b39

View File

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