From 92ac9e45820913e783c2a6dec7c71a32d6c468ac Mon Sep 17 00:00:00 2001 From: Nauman-S Date: Mon, 30 Dec 2024 12:04:57 +0800 Subject: [PATCH] Disable pretty formatting and newline (resolves #202) --- turbo/logging/oklogformat.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/turbo/logging/oklogformat.go b/turbo/logging/oklogformat.go index 6bf4adc4b18..efd983d78e0 100644 --- a/turbo/logging/oklogformat.go +++ b/turbo/logging/oklogformat.go @@ -35,16 +35,14 @@ func OkLogV1Format(r *log.Record) []byte { props[k] = formatJSONValue(r.Ctx[i+1]) } - b, err := json.MarshalIndent(props, "", " ") + b, err := json.Marshal(props) if err != nil { - b, _ = json.MarshalIndent(map[string]string{ + b, _ = json.Marshal(map[string]string{ errorKey: err.Error(), - }, "", " ") + }) return b } - b = append(b, '\n') - return b }