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

Method RawJSON

context.go:176–179  ·  view source on GitHub ↗

RawJSON adds already encoded JSON to context. No sanity check is performed on b; it must not contain carriage returns and be valid JSON.

(key string, b []byte)

Source from the content-addressed store, hash-verified

174// No sanity check is performed on b; it must not contain carriage returns and
175// be valid JSON.
176func (c Context) RawJSON(key string, b []byte) Context {
177 c.l.context = appendJSON(enc.AppendKey(c.l.context, key), b)
178 return c
179}
180
181// AnErr adds the field key with serialized err to the logger context.
182// If err is nil, no field is added.

Callers

nothing calls this directly

Calls 2

appendJSONFunction · 0.70
AppendKeyMethod · 0.65

Tested by

no test coverage detected