diff --git a/app/kuma-dp/pkg/dataplane/accesslogs/sender.go b/app/kuma-dp/pkg/dataplane/accesslogs/sender.go index 4cf5feca1b5e..90621d4dea02 100644 --- a/app/kuma-dp/pkg/dataplane/accesslogs/sender.go +++ b/app/kuma-dp/pkg/dataplane/accesslogs/sender.go @@ -30,7 +30,7 @@ func (s *sender) Connect() error { } func (s *sender) Send(record string) error { - _, err := s.conn.Write(append([]byte(record), byte('\n'))) + _, err := s.conn.Write([]byte(record)) return errors.Wrapf(err, "failed to send a log entry to a TCP logging backend: %s", s.address) } diff --git a/pkg/xds/envoy/listeners/access_log_configurer.go b/pkg/xds/envoy/listeners/access_log_configurer.go index 5e00a13f06d6..312b03463450 100644 --- a/pkg/xds/envoy/listeners/access_log_configurer.go +++ b/pkg/xds/envoy/listeners/access_log_configurer.go @@ -46,7 +46,8 @@ func convertLoggingBackend(mesh string, trafficDirection TrafficDirection, sourc if backend.Format != "" { formatString = backend.Format } - format, err := accesslog.ParseFormat(formatString) + + format, err := accesslog.ParseFormat(formatString + "\n") if err != nil { return nil, errors.Wrapf(err, "invalid access log format string: %s", formatString) }