From 41fb325372034c7a42bf0157cdc08894d8371247 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 2 Jul 2020 13:29:45 +0100 Subject: send $line base64 encoded over the wire --- internal/mapr/aggregateset.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'internal/mapr/aggregateset.go') diff --git a/internal/mapr/aggregateset.go b/internal/mapr/aggregateset.go index fdf8db2..d8705bd 100644 --- a/internal/mapr/aggregateset.go +++ b/internal/mapr/aggregateset.go @@ -6,8 +6,6 @@ import ( "fmt" "strconv" "strings" - - "github.com/mimecast/dtail/internal/io/logger" ) // AggregateSet represents aggregated key/value pairs from the @@ -86,11 +84,7 @@ func (s *AggregateSet) Serialize(ctx context.Context, groupKey string, ch chan<- sb.WriteString(k) sb.WriteString("=") if k == "$line" { - decoded, err := base64.StdEncoding.DecodeString(v) - if err != nil { - logger.Error("Unable to decode $line", err, v) - } - sb.WriteString(string(decoded)) + sb.WriteString(base64.StdEncoding.EncodeToString([]byte(v))) sb.WriteString("|") continue } -- cgit v1.2.3