From 4b6c65fc15164905ce29593b69641dfd2a69977f Mon Sep 17 00:00:00 2001 From: kim Date: Sun, 7 Sep 2025 16:16:06 +0200 Subject: [PATCH] [bugfix] ensure std log writer passes byte slices along as string, or JSON will encode as base64 raw bytes (#4416) Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4416 Co-authored-by: kim Co-committed-by: kim --- internal/log/std.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/log/std.go b/internal/log/std.go index 47adec128..5cb73f6c1 100644 --- a/internal/log/std.go +++ b/internal/log/std.go @@ -20,6 +20,7 @@ package log import ( "log" + "codeberg.org/gruf/go-byteutil" "codeberg.org/gruf/go-kv/v2" ) @@ -36,7 +37,7 @@ func (w stdLogWriter) Write(b []byte) (int, error) { if w.lvl <= loglvl { logf(nil, w.lvl, kv.Fields{ {K: "caller", V: Caller(5)}, - {K: "msg", V: b}, + {K: "msg", V: byteutil.B2S(b)}, }, "") } return len(b), nil