From 1896d434892729995453cdfedc65371b3016973e Mon Sep 17 00:00:00 2001 From: BabyHalimao Date: Tue, 4 Jun 2024 10:54:21 +0800 Subject: [PATCH] update comments --- log/handler_glog.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/log/handler_glog.go b/log/handler_glog.go index 6f3eea1379..48086fe944 100644 --- a/log/handler_glog.go +++ b/log/handler_glog.go @@ -168,8 +168,9 @@ func (h *GlogHandler) WithGroup(name string) slog.Handler { panic("not implemented") } -// Handle implements slog.Handler.Handle, filtering a log record through the global, local -// and backtrace filters, finally emitting it if either allows it through. +// Handle implements slog.Handler.Handle +// If the global log level allows, fast track logging. +// Else use the calculated log level to track logging or drop it. func (h *GlogHandler) Handle(_ context.Context, r slog.Record) error { // If the global log level allows, fast track logging if slog.Level(h.level.Load()) <= r.Level {