From 63556b3082cb0236e3de2064b827d03601109356 Mon Sep 17 00:00:00 2001 From: Matthias Rampke Date: Wed, 30 Aug 2017 08:57:48 +0000 Subject: [PATCH] check for unusual end of input --- exporter.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/exporter.go b/exporter.go index 2d32b1c..0598612 100644 --- a/exporter.go +++ b/exporter.go @@ -136,5 +136,8 @@ func (re *rsyslogExporter) run() { for re.scanner.Scan() { re.handleStatLine(re.scanner.Bytes()) } + if err := re.scanner.Err(); err != nil { + log.Printf("error reading input: %v", err) + } os.Exit(0) }