diff --git a/log.go b/log.go index 792e8c1..030f543 100644 --- a/log.go +++ b/log.go @@ -45,6 +45,14 @@ func NewWithFactory(factory WrapperFactoryFunc) *Logger { return logger } +func (l *Logger) GetFramesToSkip() int { + return l.callerFrameToSkip +} + +func (l *Logger) SetFramesToSkip(s int) { + l.callerFrameToSkip = s +} + func (l *Logger) RegisterField(fields ...Field) { l.registeredFieldsMutex.Lock() defer l.registeredFieldsMutex.Unlock() @@ -230,6 +238,14 @@ func ContextWithStackTrace(ctx context.Context, err error) context.Context { return ctx } +func GetFramesToSkip() int { + return global.GetFramesToSkip() +} + +func SetFramesToSkip(s int) { + global.SetFramesToSkip(s) +} + func RegisterField(fields ...Field) { global.RegisterField(fields...) }