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:
parent
c2b9d0e2de
commit
e218d18951
|
@ -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] == '/' {
|
||||
|
|
Loading…
Reference in New Issue