优化cmd 启动程序

This commit is contained in:
liwei1dao 2023-01-29 14:03:54 +08:00
parent 40648050c4
commit 13a3a26928

View File

@ -79,7 +79,7 @@ func init() {
RootCmd.PersistentFlags().StringVarP(&gmpath, "gm", "g", "./gm.json", "游戏区服配置")
RootCmd.PersistentFlags().StringVarP(&crosspath, "cross", "c", "./cross.json", "游戏跨服配置")
RootCmd.PersistentFlags().StringVarP(&sid, "sid", "i", "", "区服id")
RootCmd.PersistentFlags().BoolVarP(&onelog, "log", "l", false, "输出日志")
RootCmd.PersistentFlags().BoolVarP(&onelog, "log", "l", true, "输出日志")
RootCmd.AddCommand(confCmd, startCmd, stopCmd, restart)
}
@ -336,6 +336,7 @@ func convertServiceSttings(config *comm.GameConfig, id int, stype string, ip str
}
} else {
sseting.Sys["log"] = map[string]interface{}{
"Alias": sseting.Id,
"FileName": fmt.Sprintf("./log/%s.log", config.AreaId),
"Loglevel": config.Loglevel,
"MaxAgeTime": config.MaxAgeTime,