From e218d18951a18f1ef4bd3384f95b7e58abd9c90b Mon Sep 17 00:00:00 2001 From: Michael Nikitochkin Date: Fri, 9 Sep 2022 23:18:08 +0200 Subject: [PATCH] Update example of usage CallerMarshalFunc (#475) There was changes in https://github.com/rs/zerolog/pull/457 pass program counter to CallerMarshalFunc. Update example in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95666b3..e8cbfc2 100644 --- a/README.md +++ b/README.md @@ -411,7 +411,7 @@ log.Info().Msg("hello world") Equivalent of `Lshortfile`: ```go -zerolog.CallerMarshalFunc = func(file string, line int) string { +zerolog.CallerMarshalFunc = func(pc uintptr, file string, line int) string { short := file for i := len(file) - 1; i > 0; i-- { if file[i] == '/' {