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

Method CallerSkipFrame

event.go:847–853  ·  view source on GitHub ↗

CallerSkipFrame instructs any future Caller calls to skip the specified number of frames. This includes those added via hooks from the context.

(skip int)

Source from the content-addressed store, hash-verified

845// CallerSkipFrame instructs any future Caller calls to skip the specified number of frames.
846// This includes those added via hooks from the context.
847func (e *Event) CallerSkipFrame(skip int) *Event {
848 if e == nil {
849 return e
850 }
851 e.skipFrame += skip
852 return e
853}
854
855// Caller adds the file:line of the caller with the zerolog.CallerFieldName key.
856// The argument skip is the number of stack frames to ascend

Callers 8

TestEvent_WithNilEventFunction · 0.95
PrintMethod · 0.80
PrintfMethod · 0.80
PrintlnMethod · 0.80
WriteMethod · 0.80
PrintFunction · 0.80
PrintfFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestEvent_WithNilEventFunction · 0.76