pkg/kmsg: write to stderr (instead of stdout)

Part of #3111

Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
David Scott
2018-07-13 10:39:11 +01:00
parent 70385eb86e
commit 637b1bdb3f
2 changed files with 5 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ package main
import (
"fmt"
"log"
"os"
"time"
"github.com/euank/go-kmsg-parser/kmsgparser"
@@ -20,6 +21,6 @@ func main() {
kmsg := parser.Parse()
for msg := range kmsg {
fmt.Printf("(%d) - %s: %s", msg.SequenceNumber, msg.Timestamp.Format(time.RFC3339Nano), msg.Message)
fmt.Fprintf(os.Stderr, "(%d) - %s: %s", msg.SequenceNumber, msg.Timestamp.Format(time.RFC3339Nano), msg.Message)
}
}