diff options
| author | 2025-09-07 16:16:06 +0200 | |
|---|---|---|
| committer | 2025-09-07 16:16:06 +0200 | |
| commit | 4b6c65fc15164905ce29593b69641dfd2a69977f (patch) | |
| tree | 33b983b194d1d7810a4f49afaf85aab607c76336 | |
| parent | [performance] more logging tweaks (#4415) (diff) | |
| download | gotosocial-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>
| -rw-r--r-- | internal/log/std.go | 3 |
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 |
