From 8576a81d548e06678d43bb328d96e6e39aaf8473 Mon Sep 17 00:00:00 2001 From: Gorbunov Kirill Andreevich Date: Sun, 14 Apr 2024 17:13:39 +0300 Subject: [PATCH 1/2] #335 caller skip count. --- logger/options.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/logger/options.go b/logger/options.go index 7ea04e74..895583ff 100644 --- a/logger/options.go +++ b/logger/options.go @@ -81,3 +81,9 @@ func WithName(n string) Option { o.Name = n } } + +func WithIncCallerSkipCount(n int) Option { + return func(o *Options) { + o.CallerSkipCount += n + } +} -- 2.45.2 From e8f48f20995bdd0eee7253a2623b86d62907e281 Mon Sep 17 00:00:00 2001 From: Gorbunov Kirill Andreevich Date: Mon, 15 Apr 2024 13:24:20 +0300 Subject: [PATCH 2/2] #335 change name options --- logger/options.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logger/options.go b/logger/options.go index 5bc96417..3138892d 100644 --- a/logger/options.go +++ b/logger/options.go @@ -183,7 +183,8 @@ func WithMicroKeys() Option { } } -func WithIncCallerSkipCount(n int) Option { +// WithAddCallerSkipCount add skip count for copy logger +func WithAddCallerSkipCount(n int) Option { return func(o *Options) { o.CallerSkipCount += n } -- 2.45.2