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

Method caller

event.go:866–874  ·  view source on GitHub ↗
(skip int)

Source from the content-addressed store, hash-verified

864}
865
866func (e *Event) caller(skip int) *Event {
867 if e == nil {
868 return e
869 }
870 if pc, file, line, ok := runtime.Caller(skip + e.skipFrame); ok {
871 e.buf = enc.AppendString(enc.AppendKey(e.buf, CallerFieldName), CallerMarshalFunc(pc, file, line))
872 }
873 return e
874}
875
876// IPAddr adds the field key with ip as a net.IP IPv4 or IPv6 Address to the event
877func (e *Event) IPAddr(key string, ip net.IP) *Event {

Callers 2

CallerMethod · 0.95
RunMethod · 0.80

Calls 3

AppendStringMethod · 0.65
AppendKeyMethod · 0.65
CallerMethod · 0.45

Tested by

no test coverage detected