From 4ca168412bee3ca93a3f95272f566624b0f14599 Mon Sep 17 00:00:00 2001 From: yuancjun <102513452+yuancjun@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:57:22 +0800 Subject: [PATCH] avoid a single space at the end of a line. --- os/glog/glog_logger_handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os/glog/glog_logger_handler.go b/os/glog/glog_logger_handler.go index 5c7d9932c91..b275ee09206 100644 --- a/os/glog/glog_logger_handler.go +++ b/os/glog/glog_logger_handler.go @@ -81,7 +81,8 @@ func (i *HandlerInput) getDefaultBuffer(withColor bool) *bytes.Buffer { if i.Content != "" { i.addStringToBuffer(buffer, i.Content) } - i.addStringToBuffer(buffer, "\n") + // avoid a single space at the end of a line. + buffer.WriteString("\n") return buffer }