From dc7ed05cce914ab55e2e1d2f44e092c8fdcb8c44 Mon Sep 17 00:00:00 2001 From: Xing Date: Mon, 16 Dec 2024 14:30:45 +0800 Subject: [PATCH] fix: unaligned 64-bit atomic operation - DefaultHandler --- v2/handler.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/v2/handler.go b/v2/handler.go index 9107a1c..90fd768 100644 --- a/v2/handler.go +++ b/v2/handler.go @@ -119,18 +119,18 @@ func WithNoTimestamp() HandlerOption { // DefaultHandler is a Handler that can be used along with NewSLogger to // instantiate a structured logger. type DefaultHandler struct { - opts *handlerOpts - level int64 tag string prefix string fields []slog.Attr - callstackOffset bool - - flag uint32 + + opts *handlerOpts buf *buffer mu *sync.Mutex w io.Writer + + flag uint32 + callstackOffset bool } // A compile-time check to ensure that DefaultHandler implements Handler.