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

Method Hex

event.go:388–394  ·  view source on GitHub ↗

Hex adds the field key with val as a hex string to the *Event context.

(key string, val []byte)

Source from the content-addressed store, hash-verified

386
387// Hex adds the field key with val as a hex string to the *Event context.
388func (e *Event) Hex(key string, val []byte) *Event {
389 if e == nil {
390 return e
391 }
392 e.buf = enc.AppendHex(enc.AppendKey(e.buf, key), val)
393 return e
394}
395
396// RawJSON adds already encoded JSON to the log line under key.
397//

Callers 7

TestWithFunction · 0.45
TestWithResetFunction · 0.45
TestFieldsFunction · 0.45
TestFieldsDisabledFunction · 0.45
TestArrayFunction · 0.45
BenchmarkLogFieldTypeFunction · 0.45

Calls 2

AppendHexMethod · 0.65
AppendKeyMethod · 0.65

Tested by 7

TestWithFunction · 0.36
TestWithResetFunction · 0.36
TestFieldsFunction · 0.36
TestFieldsDisabledFunction · 0.36
TestArrayFunction · 0.36
BenchmarkLogFieldTypeFunction · 0.36