MCPcopy Index your code
hub / github.com/foxcpp/maddy / Write

Method Write

framework/log/zap.go:43–53  ·  view source on GitHub ↗
(entry zapcore.Entry, fields []zapcore.Field)

Source from the content-addressed store, hash-verified

41}
42
43func (l zapLogger) Write(entry zapcore.Entry, fields []zapcore.Field) error {
44 enc := zapcore.NewMapObjectEncoder()
45 for _, f := range fields {
46 f.AddTo(enc)
47 }
48 if entry.LoggerName != "" {
49 l.L.Name += "/" + entry.LoggerName
50 }
51 l.L.log(entry.Level == zapcore.DebugLevel, l.L.formatMsg(entry.Message, enc.Fields))
52 return nil
53}
54
55func (zapLogger) Sync() error {
56 return nil

Callers

nothing calls this directly

Calls 2

formatMsgMethod · 0.80
logMethod · 0.45

Tested by

no test coverage detected