WrapCore wraps or replaces the Logger's underlying zapcore.Core.
(f func(zapcore.Core) zapcore.Core)
| 40 | |
| 41 | // WrapCore wraps or replaces the Logger's underlying zapcore.Core. |
| 42 | func WrapCore(f func(zapcore.Core) zapcore.Core) Option { |
| 43 | return optionFunc(func(log *Logger) { |
| 44 | log.core = f(log.core) |
| 45 | }) |
| 46 | } |
| 47 | |
| 48 | // Hooks registers functions which will be called each time the Logger writes |
| 49 | // out an Entry. Repeated use of Hooks is additive. |