|
|
@@ -118,7 +118,8 @@ func InitFileLog(logPath string) error {
|
|
|
logPath = defaultDir
|
|
|
}
|
|
|
|
|
|
- if fi, err := os.Stat(logPath); err == nil && fi.IsDir() {
|
|
|
+ fi, err := os.Stat(logPath)
|
|
|
+ if err != nil || fi.IsDir() {
|
|
|
logPath = filepath.Join(logPath, "monitor.log")
|
|
|
}
|
|
|
|