mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 03:07:45 +08:00
improve package internal/intlog
This commit is contained in:
parent
ffc88eaaa7
commit
04e42d2175
@ -37,11 +37,6 @@ func SetEnabled(enabled bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// IsEnabled checks and returns whether current process is in GF development.
|
||||
func IsEnabled() bool {
|
||||
return isGFDebug
|
||||
}
|
||||
|
||||
// Print prints `v` with newline using fmt.Println.
|
||||
// The parameter `v` can be multiple variables.
|
||||
func Print(v ...interface{}) {
|
||||
|
@ -409,7 +409,7 @@ func (c *Config) getJson(file ...string) *gjson.Json {
|
||||
}
|
||||
}
|
||||
return j
|
||||
} else {
|
||||
}
|
||||
if errorPrint() {
|
||||
if filePath != "" {
|
||||
glog.Criticalf(`[gcfg] Load config file "%s" failed: %s`, filePath, err.Error())
|
||||
@ -417,7 +417,6 @@ func (c *Config) getJson(file ...string) *gjson.Json {
|
||||
glog.Criticalf(`[gcfg] Load configuration failed: %s`, err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if r != nil {
|
||||
|
@ -47,7 +47,8 @@ func (w *Watcher) AddOnce(name, path string, callbackFunc func(event *Event), re
|
||||
if err := w.watcher.Add(subPath); err != nil {
|
||||
intlog.Error(err)
|
||||
} else {
|
||||
intlog.Printf("watcher adds monitor for: %s", subPath)
|
||||
// It uses `Errorf` as it needs trace stack information here.
|
||||
intlog.Errorf("watcher adds monitor for: %s", subPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user