MCPcopy
hub / github.com/rs/zerolog / appendObject

Function appendObject

fields.go:44–51  ·  view source on GitHub ↗
(dst []byte, obj LogObjectMarshaler, stack bool, ctx context.Context, hooks []Hook)

Source from the content-addressed store, hash-verified

42}
43
44func appendObject(dst []byte, obj LogObjectMarshaler, stack bool, ctx context.Context, hooks []Hook) []byte {
45 e := newEvent(LevelWriterAdapter{io.Discard}, DebugLevel, stack, ctx, hooks)
46 e.buf = e.buf[:0] // discard the beginning marker added by newEvent
47 e.appendObject(obj)
48 dst = append(dst, e.buf...)
49 putEvent(e)
50 return dst
51}
52
53func appendFieldList(dst []byte, kvList []interface{}, stack bool, ctx context.Context, hooks []Hook) []byte {
54 for i, n := 0, len(kvList); i < n; i += 2 {

Callers 3

ObjectsMethod · 0.85
ObjectMethod · 0.85
appendFieldListFunction · 0.85

Calls 3

newEventFunction · 0.85
putEventFunction · 0.85
appendObjectMethod · 0.80

Tested by

no test coverage detected