全面替换log为zap

This commit is contained in:
2024-11-08 18:42:13 +08:00
parent 3da1fe761e
commit edb8d30605
17 changed files with 269 additions and 55 deletions

View File

@@ -3,15 +3,15 @@ package video
import (
"bufio"
"context"
"game-driver/pkg/logger"
"io"
"log"
"os/exec"
"sync"
)
func Play(ctx context.Context, file string) error {
if file == "" {
log.Println("video file is empty")
logger.Infoln("video file is empty")
return nil
}
cmd := exec.CommandContext(ctx, "ffplay", "-autoexit", "-fs", file)
@@ -39,7 +39,7 @@ func Play(ctx context.Context, file string) error {
}
break
}
log.Println(string(line))
logger.Infoln(string(line))
}
}
}()