Skip to content
Snippets Groups Projects
Commit 1ccee173 authored by Matthias Rampke's avatar Matthias Rampke Committed by ale
Browse files

Print log lines as string, not single bytes

Using %s coerces the byte array into a string, which makes it much more
readable.
parent b7c7db5e
No related branches found
No related tags found
No related merge requests found
...@@ -140,7 +140,7 @@ func (re *rsyslogExporter) run() { ...@@ -140,7 +140,7 @@ func (re *rsyslogExporter) run() {
for re.scanner.Scan() { for re.scanner.Scan() {
err := re.handleStatLine(re.scanner.Bytes()) err := re.handleStatLine(re.scanner.Bytes())
if err != nil { if err != nil {
log.Printf("error handling stats line: %v, line was: %v", err, re.scanner.Bytes()) log.Printf("error handling stats line: %v, line was: %s", err, re.scanner.Bytes())
} }
} }
if err := re.scanner.Err(); err != nil { if err := re.scanner.Err(); err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment