修改日志模块

This commit is contained in:
huangxiaolei
2022-12-13 16:52:06 +08:00
parent 9dc864ff69
commit 662b058327
19 changed files with 134 additions and 82 deletions

View File

@@ -18,7 +18,7 @@ import (
func Run(ctx context.Context, configFile string) error {
config.InitConfig(configFile)
logger.InitLogger("gm", config.CONF.Logger)
logger.InitLogger("gm")
logger.LOG.Info("gm start")
conn, err := nats.Connect(config.CONF.MQ.NatsUrl)

View File

@@ -48,7 +48,7 @@ func (c *Controller) registerRouter() {
engine.Use(c.authorize())
engine.POST("/gm/cmd", c.gmCmd)
port := config.CONF.HttpPort
addr := ":" + strconv.Itoa(port)
addr := ":" + strconv.Itoa(int(port))
err := engine.Run(addr)
if err != nil {
logger.LOG.Error("gin run error: %v", err)