From 03335f3949fd7d05db2628940a010c4dc8ecf14d Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 24 Jan 2018 14:07:59 +1030 Subject: [PATCH] Improved logging --- revid/RevidInstance.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/revid/RevidInstance.go b/revid/RevidInstance.go index a52b042d..e5edd3d2 100644 --- a/revid/RevidInstance.go +++ b/revid/RevidInstance.go @@ -179,14 +179,14 @@ func (r *revidInst)IsRunning() bool { func (r *revidInst) Start() { if r.isRunning { - r.Log(Warning,"Start() has been called but revid already running!") + r.Log(Warning,"revidInst.Start() called but revid already running!") return } - r.Log(Debug,"Starting Revid!") + r.Log(Info,"Starting Revid!") var h264Data []byte switch r.config.Input { case Raspivid: - r.Log(Debug,"Starting raspivid!") + r.Log(Info,"Starting raspivid!") cmd = exec.Command("raspivid", "-o", "-", "-n", "-t", "0", "-b", r.config.Bitrate,"-qp", r.config.Quantization, "-w", r.config.Width, "-h", r.config.Height, "-fps", r.config.FrameRate, "-ih", "-g", "100") stdout, _ := cmd.StdoutPipe() @@ -198,7 +198,7 @@ func (r *revidInst) Start() { } r.isRunning = true go func() { - r.Log(Debug, "Reading camera data!") + r.Log(Info, "Reading camera data!") for r.isRunning { h264Data = make([]byte, 1) _, err := io.ReadFull(inputReader, h264Data) @@ -214,7 +214,7 @@ func (r *revidInst) Start() { r.h264Parser.InputByteChan <- h264Data[0] } } - r.Log(Debug, "Out of reading routine!") + r.Log(Info, "Out of reading routine!") }() case File: stats, err := r.inputFile.Stat() @@ -236,11 +236,11 @@ func (r *revidInst) Start() { func (r *revidInst) Stop() { if r.isRunning { - r.Log(Debug,"Stopping revid!") + r.Log(Info,"Stopping revid!") r.isRunning = false cmd.Process.Kill() } else { - r.Log(Warning,"Tried to stop revid, but not even running!") + r.Log(Warning,"revidInst.Stop() called but revid not running!") } }