WithCaller configures the Logger to annotate each message with the filename, line number, and function name of zap's caller, or not, depending on the value of enabled. This is a generalized form of AddCaller.
(enabled bool)
| 96 | // line number, and function name of zap's caller, or not, depending on the |
| 97 | // value of enabled. This is a generalized form of AddCaller. |
| 98 | func WithCaller(enabled bool) Option { |
| 99 | return optionFunc(func(log *Logger) { |
| 100 | log.addCaller = enabled |
| 101 | }) |
| 102 | } |
| 103 | |
| 104 | // AddCallerSkip increases the number of callers skipped by caller annotation |
| 105 | // (as enabled by the AddCaller option). When building wrappers around the |