From bd9ff08c12dc38628b53f1bfdf24825faf8ca2ba Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 23 Jan 2018 20:17:13 +1030 Subject: [PATCH] Change prints to use logger --- revid/RevidInstance.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/revid/RevidInstance.go b/revid/RevidInstance.go index 3daa78b7..76b86ff3 100644 --- a/revid/RevidInstance.go +++ b/revid/RevidInstance.go @@ -337,7 +337,7 @@ func (r *revidInst)sendClipToHTTP(clip []byte, output string) error { Timeout: timeout, } url := output + strconv.Itoa(len(clip)) - fmt.Printf("Posting %s (%d bytes)\n", url, len(clip)) + r.ErrOut(fmt.Sprintf("Posting %s (%d bytes)\n", url, len(clip))) resp, err := client.Post(url, "video/mp2t", bytes.NewReader(clip)) // lighter than NewBuffer if err != nil { return fmt.Errorf("Error posting to %s: %s", output, err) @@ -345,7 +345,7 @@ func (r *revidInst)sendClipToHTTP(clip []byte, output string) error { defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err == nil { - fmt.Printf("%s\n", body) + r.ErrOut(fmt.Sprintf("%s\n", body)) } else { r.ErrOut(err.Error()) }