From 59cc2d409a61aaa6146de5f5a8edf4f004567023 Mon Sep 17 00:00:00 2001 From: saxon Date: Mon, 14 Jan 2019 16:37:18 +1030 Subject: [PATCH] Revert "revid: removed redundant error logging" This reverts commit eacbfb9ee32a1186aadf29fb0a0bc71f97d46e5b. --- revid/revid.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/revid/revid.go b/revid/revid.go index e02740cc..ddf8dacb 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -48,8 +48,6 @@ import ( "bitbucket.org/ausocean/utils/ring" ) -var () - // Misc constants const ( clipDuration = 1 * time.Second @@ -142,7 +140,8 @@ func (p *packer) Write(frame []byte) (int, error) { p.owner.config.Logger.Log(logger.Warning, pkg+"dropped frame", "frame size", len(frame)) return len(frame), nil } - return n, errors.New(pkg + "unexpected ring buffer write error: " + err.Error()) + p.owner.config.Logger.Log(logger.Error, pkg+"unexpected ring buffer write error", "error", err.Error()) + return n, err } p.packetCount++ now := time.Now() @@ -471,6 +470,7 @@ func (r *Revid) setupInputForFile() error { delay := time.Second / time.Duration(r.config.FrameRate) f, err := os.Open(r.config.InputFileName) if err != nil { + r.config.Logger.Log(logger.Error, err.Error()) r.Stop() return err }