Logger is the structure that writes formatted output to the underlying log.Output object. Logger is stateless and can be copied freely. However, consider that underlying log.Output will not be copied. Each log message is prefixed with logger name. Timestamp and debug flag formatting is done by l
| 42 | // No serialization is provided by Logger, its log.Output responsibility to |
| 43 | // ensure goroutine-safety if necessary. |
| 44 | type Logger struct { |
| 45 | Parent *Logger |
| 46 | |
| 47 | Out Output |
| 48 | Name string |
| 49 | Debug bool |
| 50 | |
| 51 | // Additional fields that will be added |
| 52 | // to the Msg output. |
| 53 | Fields map[string]interface{} |
| 54 | } |
| 55 | |
| 56 | func (l *Logger) Zap() *zap.Logger { |
| 57 | // TODO: Migrate to using zap natively. |
nothing calls this directly
no outgoing calls
no test coverage detected