Skip to content

WithCallDepth should be additive #27

@muhlemmer

Description

@muhlemmer

The logr documentation on WithCallDepth and CallDepthLogSink interface both say:

Successive calls to this are additive.

However, this implementation replaces the current depth instead of adding:

logrusr/logrusr.go

Lines 213 to 220 in d198d3e

// WithCallDepth implements the optional WithCallDepth to offset the call stack
// when reporting caller.
func (l *logrusr) WithCallDepth(depth int) logr.LogSink {
newLogger := l.copyLogger()
newLogger.depth = depth
return newLogger
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions