0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 09:04:45 +01:00

#2115 more precise error message

This commit is contained in:
Unknwon 2015-12-08 01:11:40 -05:00
parent 2528c482e9
commit 1cbd4c01fb

View file

@ -509,7 +509,10 @@ func newLogService() {
LogConfigs[i] = fmt.Sprintf(`{"level":%s}`, level)
case "file":
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(
`{"level":%s,"filename":"%s","rotate":%v,"maxlines":%d,"maxsize":%d,"daily":%v,"maxdays":%d}`, level,
logPath,