mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: cross compile script
This commit is contained in:
@@ -89,7 +89,7 @@ func Init(path string) {
|
||||
"{SessionSecret}": util.RandStringRunes(64),
|
||||
"{HashIDSalt}": util.RandStringRunes(64),
|
||||
}, defaultConf)
|
||||
f, err := util.CreatNestedFile("conf.ini")
|
||||
f, err := util.CreatNestedFile(path)
|
||||
if err != nil {
|
||||
util.Log().Panic("无法创建配置文件, %s", err)
|
||||
}
|
||||
@@ -101,7 +101,6 @@ func Init(path string) {
|
||||
}
|
||||
|
||||
f.Close()
|
||||
path = "conf.ini"
|
||||
}
|
||||
|
||||
cfg, err = ini.Load(path)
|
||||
@@ -125,6 +124,13 @@ func Init(path string) {
|
||||
}
|
||||
}
|
||||
|
||||
// 重设log等级
|
||||
if !SystemConfig.Debug {
|
||||
util.Level = util.LevelInformational
|
||||
util.GloablLogger = nil
|
||||
util.Log()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// mapSection 将配置文件的 Section 映射到结构体上
|
||||
|
||||
Reference in New Issue
Block a user