全面替换log为zap
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user