MCPcopy
hub / github.com/uber-go/zap / MarshalLogObject

Method MarshalLogObject

example_test.go:182–186  ·  view source on GitHub ↗
(enc zapcore.ObjectEncoder)

Source from the content-addressed store, hash-verified

180}
181
182func (r *request) MarshalLogObject(enc zapcore.ObjectEncoder) error {
183 enc.AddString("url", r.URL)
184 zap.Inline(r.Listen).AddTo(enc)
185 return enc.AddObject("remote", r.Remote)
186}
187
188func ExampleObject() {
189 logger := zap.NewExample()

Callers

nothing calls this directly

Calls 4

InlineFunction · 0.92
AddToMethod · 0.80
AddStringMethod · 0.65
AddObjectMethod · 0.65

Tested by

no test coverage detected