完成日志输出到文件、终端多处的处理

This commit is contained in:
2024-11-13 16:11:59 +08:00
parent 9b643f4352
commit 28291598bb
28 changed files with 175 additions and 330 deletions

View File

@@ -3,7 +3,7 @@ package routes
import (
"game-driver/internal/common"
"game-driver/leaf"
"game-driver/pkg/logger"
"go.uber.org/zap"
)
func Command(d *common.Device) leaf.HandlerFunc {
@@ -17,7 +17,7 @@ func Command(d *common.Device) leaf.HandlerFunc {
case "status":
d.PublishStatus()
default:
logger.Infof("接收到无效指令: %s\n", cmd)
zap.S().Infof("接收到无效指令: %s\n", cmd)
}
}
}