From 94e43975941208f07aa003847f0b8c2c067f45fa Mon Sep 17 00:00:00 2001 From: saxon Date: Wed, 2 Jan 2019 17:21:03 +1030 Subject: [PATCH 1/3] revid: trying to work out bug --- cmd/revid-cli/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index 68d5c791..4d408659 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -38,7 +38,6 @@ import ( "bitbucket.org/ausocean/av/revid" "bitbucket.org/ausocean/iot/pi/netsender" - "bitbucket.org/ausocean/iot/pi/smartlogger" "bitbucket.org/ausocean/utils/logger" ) From 686a507ff8dec43486ccd2b8ecac6803fd75d478 Mon Sep 17 00:00:00 2001 From: saxon Date: Wed, 2 Jan 2019 17:21:33 +1030 Subject: [PATCH 2/3] revid: fixed smartlogger import path --- cmd/revid-cli/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index 4d408659..68d5c791 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -38,6 +38,7 @@ import ( "bitbucket.org/ausocean/av/revid" "bitbucket.org/ausocean/iot/pi/netsender" + "bitbucket.org/ausocean/iot/pi/smartlogger" "bitbucket.org/ausocean/utils/logger" ) From cca95f1c5dd78b61300306cb7f8cb2528f630b6d Mon Sep 17 00:00:00 2001 From: saxon Date: Wed, 2 Jan 2019 17:32:20 +1030 Subject: [PATCH 3/3] revid: fixed cmds used for testing --- revid/cmd/h264-file-to-flv-rtmp/main.go | 7 ++++--- revid/cmd/h264-file-to-mpgets-file/main.go | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/revid/cmd/h264-file-to-flv-rtmp/main.go b/revid/cmd/h264-file-to-flv-rtmp/main.go index 5eba1e4e..5f79df4a 100644 --- a/revid/cmd/h264-file-to-flv-rtmp/main.go +++ b/revid/cmd/h264-file-to-flv-rtmp/main.go @@ -33,7 +33,8 @@ import ( "time" "bitbucket.org/ausocean/av/revid" - "bitbucket.org/ausocean/utils/smartlogger" + "bitbucket.org/ausocean/iot/pi/smartlogger" + "bitbucket.org/ausocean/utils/logger" ) const ( @@ -61,11 +62,11 @@ func main() { RtmpMethod: revid.LibRtmp, RtmpUrl: *rtmpUrlPtr, Packetization: revid.Flv, - Logger: smartlogger.New(logger.Info, logPath), + Logger: logger.New(logger.Info, &smartlogger.New(logPath).LogRoller), } revidInst, err := revid.New(config, nil) if err != nil { - config.log.Log(logger.Error, "Should not have got an error!: ", err.Error()) + config.Logger.Log(logger.Error, "Should not have got an error!: ", err.Error()) return } revidInst.Start() diff --git a/revid/cmd/h264-file-to-mpgets-file/main.go b/revid/cmd/h264-file-to-mpgets-file/main.go index 218940ab..03a39fde 100644 --- a/revid/cmd/h264-file-to-mpgets-file/main.go +++ b/revid/cmd/h264-file-to-mpgets-file/main.go @@ -31,7 +31,8 @@ import ( "time" "bitbucket.org/ausocean/av/revid" - "bitbucket.org/ausocean/utils/smartlogger" + "bitbucket.org/ausocean/iot/pi/smartlogger" + "bitbucket.org/ausocean/utils/logger" ) const ( @@ -52,11 +53,11 @@ func main() { Output1: revid.File, OutputFileName: outputFile, Packetization: revid.Mpegts, - Logger: smartlogger.New(logger.Info, logPath), + Logger: logger.New(logger.Info, &smartlogger.New(logPath).LogRoller), } revidInst, err := revid.New(config, nil) if err != nil { - config.log.Log(logger.Error, "Should not have got an error!:", err.Error()) + config.Logger.Log(logger.Error, "Should not have got an error!:", err.Error()) return } revidInst.Start()