summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stdin.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/stdin.go b/stdin.go
index 9848476..dd89234 100644
--- a/stdin.go
+++ b/stdin.go
@@ -44,8 +44,8 @@ func parseRawData(in <-chan []byte, cfg *Config) <-chan []RawData {
go func() {
rDat := make([]RawData, 0)
for line := range in {
- if !strings.HasPrefix(string(line), "{") {
- stlogger.Println("Got message:", string(line))
+ if len(string(line)) > 0 && !strings.HasPrefix(string(line), "{") {
+ stlogger.Println("Got message:", strings.TrimSpace(string(line)))
//This should be a break in the output from pmacct
//so we deploy our collected data and set a new timeBin
ival, err := cfg.getInterval()