diff --git a/g/os/gcfg/gcfg.go b/g/os/gcfg/gcfg.go index b5dc019c2..6fb86c8d0 100644 --- a/g/os/gcfg/gcfg.go +++ b/g/os/gcfg/gcfg.go @@ -176,11 +176,11 @@ func (c *Config) getJson(file...string) *gjson.Json { j.SetViolenceCheck(c.vc.Val()) // 添加配置文件监听,如果有任何变化,删除文件内容缓存,下一次查询会自动更新 gfsnotify.Add(filePath, func(event *gfsnotify.Event) { - c.jsons.Remove(event.Path) + c.jsons.Remove(name) }) return j } else { - glog.Errorfln(`[gcfg] Load config file "%s" failed: %s`, filePath, err.Error()) + glog.Criticalfln(`[gcfg] Load config file "%s" failed: %s`, filePath, err.Error()) } return nil })