Browse Source

#2115 more precise error message

pull/2125/head
Unknwon 9 years ago
parent
commit
1cbd4c01fb
  1. 5
      modules/setting/setting.go

5
modules/setting/setting.go

@ -509,7 +509,10 @@ func newLogService() {
LogConfigs[i] = fmt.Sprintf(`{"level":%s}`, level) LogConfigs[i] = fmt.Sprintf(`{"level":%s}`, level)
case "file": case "file":
logPath := sec.Key("FILE_NAME").MustString(path.Join(LogRootPath, "gogs.log")) logPath := sec.Key("FILE_NAME").MustString(path.Join(LogRootPath, "gogs.log"))
os.MkdirAll(path.Dir(logPath), os.ModePerm) if err = os.MkdirAll(path.Dir(logPath), os.ModePerm); err != nil {
panic(err.Error())
}
LogConfigs[i] = fmt.Sprintf( LogConfigs[i] = fmt.Sprintf(
`{"level":%s,"filename":"%s","rotate":%v,"maxlines":%d,"maxsize":%d,"daily":%v,"maxdays":%d}`, level, `{"level":%s,"filename":"%s","rotate":%v,"maxlines":%d,"maxsize":%d,"daily":%v,"maxdays":%d}`, level,
logPath, logPath,

Loading…
Cancel
Save