diff --git a/revid/cmd/h264-file-to-mpgets-file/main.go b/revid/cmd/h264-file-to-mpgets-file/main.go index 716b7914..a1238da6 100644 --- a/revid/cmd/h264-file-to-mpgets-file/main.go +++ b/revid/cmd/h264-file-to-mpgets-file/main.go @@ -28,10 +28,10 @@ LICENSE package main import ( - "log" "time" "bitbucket.org/ausocean/av/revid" + "bitbucket.org/ausocean/utils/smartlogger" ) const ( @@ -39,6 +39,7 @@ const ( outputFile = "output.ts" frameRate = "25" runDuration = 120 * time.Second + logPath = "/var/log" ) // Test h264 inputfile to flv format into rtmp using librtmp c wrapper @@ -51,10 +52,11 @@ func main() { Output: revid.File, OutputFileName: outputFile, Packetization: revid.Mpegts, + Logger: smartlogger.New(smartlogger.Info, logPath), } revidInst, err := revid.New(config, nil) if err != nil { - log.Printf("Should not of have got an error!: %v\n", err.Error()) + config.Logger.Log(smartlogger.Error, "Should not have got an error!:", err.Error()) return } revidInst.Start()