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

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

@@ -4,9 +4,9 @@ import (
"game-driver/internal/middleware"
"game-driver/internal/schema"
"game-driver/leaf"
"game-driver/pkg/logger"
"game-driver/pkg/utils"
"game-driver/pkg/video"
"go.uber.org/zap"
)
func OnlyVideo(c *leaf.Context) {
@@ -18,7 +18,7 @@ func OnlyVideo(c *leaf.Context) {
if url, ok := payload.Game["video"]; ok {
local, err := utils.LinkVideo(url.(string))
if err != nil {
logger.Errorln("视频文件获取异常: ", err)
zap.S().Errorln("视频文件获取异常: ", err)
return
}
_ = video.Play(c, local)