mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 04:07:47 +08:00
improve package internal/intlog
This commit is contained in:
parent
d0f649b328
commit
bd13de2b39
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user