summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-09-07 16:16:06 +0200
committerLibravatar kim <gruf@noreply.codeberg.org>2025-09-07 16:16:06 +0200
commit4b6c65fc15164905ce29593b69641dfd2a69977f (patch)
tree33b983b194d1d7810a4f49afaf85aab607c76336 /internal
parent[performance] more logging tweaks (#4415) (diff)
downloadgotosocial-4b6c65fc15164905ce29593b69641dfd2a69977f.tar.xz
[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 <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal')
-rw-r--r--internal/log/std.go3
1 files changed, 2 insertions, 1 deletions
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