From c3de003e4a74769c454c3c6662c2f03c92c40aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=BE=D1=80?= =?UTF-8?q?=D0=B1=D1=83=D0=BD=D0=BE=D0=B2?= Date: Mon, 15 Apr 2024 13:30:48 +0300 Subject: [PATCH] #335 caller skip count. (#337) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Gorbunov Kirill Andreevich Reviewed-on: https://git.unistack.org/unistack-org/micro/pulls/337 Co-authored-by: Кирилл Горбунов Co-committed-by: Кирилл Горбунов --- logger/options.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/logger/options.go b/logger/options.go index 4d083d81..3138892d 100644 --- a/logger/options.go +++ b/logger/options.go @@ -182,3 +182,10 @@ func WithMicroKeys() Option { o.ErrorKey = "error" } } + +// WithAddCallerSkipCount add skip count for copy logger +func WithAddCallerSkipCount(n int) Option { + return func(o *Options) { + o.CallerSkipCount += n + } +}