Skip to content

Commit

Permalink
Update example of usage CallerMarshalFunc (rs#475)
Browse files Browse the repository at this point in the history
There was changes in rs#457  pass program counter to CallerMarshalFunc.
Update example in README.md
  • Loading branch information
miry authored and pablitoc committed Apr 7, 2023
1 parent afd944a commit a0f0556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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] == '/' {
Expand Down

0 comments on commit a0f0556

Please sign in to comment.