Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Escape percent to prevent formatting in panic message
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhoefling committed Jun 21, 2018
1 parent a297087 commit 1dcf63f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beater/saltbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package beater

import (
"fmt"
"strings"
"time"

"github.com/elastic/beats/libbeat/beat"
Expand Down Expand Up @@ -77,7 +78,7 @@ func (bt *Saltbeat) Setup(b *beat.Beat) error {
var message map[string]interface{}
err = message_decoder.Decode(&message)
if err != nil {
logp.WTF(err.Error())
logp.WTF(strings.Replace(err.Error(), "%", "%%", -1))
}
logp.Debug("message", "Message read")
bt.messages <- message
Expand Down

0 comments on commit 1dcf63f

Please sign in to comment.