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

Method MarshalLogObject

logger_bench_test.go:41–46  ·  view source on GitHub ↗
(enc zapcore.ObjectEncoder)

Source from the content-addressed store, hash-verified

39}
40
41func (u *user) MarshalLogObject(enc zapcore.ObjectEncoder) error {
42 enc.AddString("name", u.Name)
43 enc.AddString("email", u.Email)
44 enc.AddInt64("created_at", u.CreatedAt.UnixNano())
45 return nil
46}
47
48var _jane = &user{
49 Name: "Jane Doe",

Callers

nothing calls this directly

Calls 2

AddStringMethod · 0.65
AddInt64Method · 0.65

Tested by

no test coverage detected