Commit 4267b9baeafcfd8e18704cea5d27e3a5bc86289a

Authored by 王家文
1 parent fb2a940d
Exists in master and in 1 other branch dev-wjw

feat✨:游戏功能配置

Showing 2 changed files with 6 additions and 1 deletions   Show diff stats
controllers/demo.go
... ... @@ -4,6 +4,7 @@ import (
4 4 "apigame/configs"
5 5 "apigame/models"
6 6 "apigame/service/code-msg"
  7 + "apigame/util/util-lx/lxalilog"
7 8 "apigame/util/zjson"
8 9 "fmt"
9 10 )
... ... @@ -23,6 +24,8 @@ func (c *DemoController) Demo() {
23 24  
24 25 fmt.Println("DemoController.demo")
25 26  
  27 + lxalilog.Errors("DemoController.demo")
  28 +
26 29 {
27 30 list := make([]configs.RoomRankRobotConfig, 0)
28 31 list = append(list, configs.RoomRankRobotConfig{
... ...
main.go
... ... @@ -44,7 +44,9 @@ func Init() bool {
44 44  
45 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 51 if !svredis.Init() {
50 52 return false
... ...