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

Method RawCBOR

event.go:412–418  ·  view source on GitHub ↗

RawCBOR adds already encoded CBOR to the log line under key. No sanity check is performed on b Note: The full featureset of CBOR is supported as data will not be mapped to json but stored as data-url

(key string, b []byte)

Source from the content-addressed store, hash-verified

410// No sanity check is performed on b
411// Note: The full featureset of CBOR is supported as data will not be mapped to json but stored as data-url
412func (e *Event) RawCBOR(key string, b []byte) *Event {
413 if e == nil {
414 return e
415 }
416 e.buf = appendCBOR(enc.AppendKey(e.buf, key), b)
417 return e
418}
419
420// AnErr adds the field key with serialized err to the *Event context.
421// If err is nil, no field is added.

Callers 2

TestEvent_WithNilEventFunction · 0.95
TestFieldsFunction · 0.80

Calls 2

appendCBORFunction · 0.70
AppendKeyMethod · 0.65

Tested by 2

TestEvent_WithNilEventFunction · 0.76
TestFieldsFunction · 0.64