gfsnotify/gfcache调试信息

This commit is contained in:
John
2018-09-16 12:46:56 +08:00
parent 359b73e61c
commit 4c467aedfa
2 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,7 @@ func (c *Cache) addMonitor(path string) {
return
}
c.notify.Add(path, func(event *gfsnotify.Event) {
//glog.Debug("gfcache:", event)
r := c.cache.Get(path).([]byte)
// 是否删除
if event.IsRemove() {

View File

@ -162,6 +162,7 @@ func (w *Watcher) startWatchLoop() {
// 监听事件
case ev := <- w.watcher.Events:
//glog.Debug("gfsnotify:", ev)
w.events.Push(&Event{
Path : ev.Name,
Op : Op(ev.Op),