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

Method MACAddr

event.go:913–919  ·  view source on GitHub ↗

MACAddr the field key with ha as a net.HardwareAddr MAC address to the event

(key string, ha net.HardwareAddr)

Source from the content-addressed store, hash-verified

911
912// MACAddr the field key with ha as a net.HardwareAddr MAC address to the event
913func (e *Event) MACAddr(key string, ha net.HardwareAddr) *Event {
914 if e == nil {
915 return e
916 }
917 e.buf = enc.AppendMACAddr(enc.AppendKey(e.buf, key), ha)
918 return e
919}

Callers 8

TestEvent_WithNilEventFunction · 0.95
ExampleContext_MACAddrFunction · 0.45
TestFieldsFunction · 0.45
TestFieldsDisabledFunction · 0.45
TestArrayFunction · 0.45
ExampleContext_MACAddrFunction · 0.45
BenchmarkLogFieldTypeFunction · 0.45

Calls 2

AppendMACAddrMethod · 0.65
AppendKeyMethod · 0.65

Tested by 8

TestEvent_WithNilEventFunction · 0.76
ExampleContext_MACAddrFunction · 0.36
TestFieldsFunction · 0.36
TestFieldsDisabledFunction · 0.36
TestArrayFunction · 0.36
ExampleContext_MACAddrFunction · 0.36
BenchmarkLogFieldTypeFunction · 0.36