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
This commit is contained in:
Michael Nikitochkin 2022-09-09 23:18:08 +02:00 committed by GitHub
parent c2b9d0e2de
commit e218d18951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@ log.Info().Msg("hello world")
Equivalent of `Lshortfile`: Equivalent of `Lshortfile`:
```go ```go
zerolog.CallerMarshalFunc = func(file string, line int) string { zerolog.CallerMarshalFunc = func(pc uintptr, file string, line int) string {
short := file short := file
for i := len(file) - 1; i > 0; i-- { for i := len(file) - 1; i > 0; i-- {
if file[i] == '/' { if file[i] == '/' {