From 3c281e11c67c6a3cd92a0996db6eeabbbe8b2e3e Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 1 Aug 2023 09:24:42 +0300 Subject: [PATCH] fix caller skip count Signed-off-by: Vasiliy Tolstov --- zerolog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerolog.go b/zerolog.go index 11c1c49..8dd87b8 100644 --- a/zerolog.go +++ b/zerolog.go @@ -73,7 +73,7 @@ func (l *zeroLogger) Init(opts ...logger.Option) error { // RESET zerolog.TimeFieldFormat = time.RFC3339 zerolog.ErrorStackMarshaler = nil - zerolog.CallerSkipFrameCount = 4 + zerolog.CallerSkipFrameCount = l.opts.Options.CallerSkipCount switch l.opts.Mode { case Development: -- 2.45.2