Commit 4267b9baeafcfd8e18704cea5d27e3a5bc86289a
1 parent
fb2a940d
Exists in
master
and in
1 other branch
feat✨:游戏功能配置
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
controllers/demo.go
| @@ -4,6 +4,7 @@ import ( | @@ -4,6 +4,7 @@ import ( | ||
| 4 | "apigame/configs" | 4 | "apigame/configs" |
| 5 | "apigame/models" | 5 | "apigame/models" |
| 6 | "apigame/service/code-msg" | 6 | "apigame/service/code-msg" |
| 7 | + "apigame/util/util-lx/lxalilog" | ||
| 7 | "apigame/util/zjson" | 8 | "apigame/util/zjson" |
| 8 | "fmt" | 9 | "fmt" |
| 9 | ) | 10 | ) |
| @@ -23,6 +24,8 @@ func (c *DemoController) Demo() { | @@ -23,6 +24,8 @@ func (c *DemoController) Demo() { | ||
| 23 | 24 | ||
| 24 | fmt.Println("DemoController.demo") | 25 | fmt.Println("DemoController.demo") |
| 25 | 26 | ||
| 27 | + lxalilog.Errors("DemoController.demo") | ||
| 28 | + | ||
| 26 | { | 29 | { |
| 27 | list := make([]configs.RoomRankRobotConfig, 0) | 30 | list := make([]configs.RoomRankRobotConfig, 0) |
| 28 | list = append(list, configs.RoomRankRobotConfig{ | 31 | list = append(list, configs.RoomRankRobotConfig{ |
main.go
| @@ -44,7 +44,9 @@ func Init() bool { | @@ -44,7 +44,9 @@ func Init() bool { | ||
| 44 | 44 | ||
| 45 | svlog.Init() | 45 | svlog.Init() |
| 46 | 46 | ||
| 47 | - svlog.InitAliLog(svconst.AppName) | 47 | + if beego.BConfig.RunMode != "dev" { |
| 48 | + svlog.InitAliLog(svconst.AppName) | ||
| 49 | + } | ||
| 48 | 50 | ||
| 49 | if !svredis.Init() { | 51 | if !svredis.Init() { |
| 50 | return false | 52 | return false |