Skip to content

Commit

Permalink
SetContextualLogger: remove unintentionally merged API call
Browse files Browse the repository at this point in the history
The SetContextualLogger call is from an earlier draft for contextual logging
and was replaced by SetLoggerWithOptions. It shouldn't have been merged in the
first place.
  • Loading branch information
pohly authored and dims committed Mar 17, 2022
1 parent 263155b commit fb03dab
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions contextual.go
Expand Up @@ -46,10 +46,6 @@ var (
// globalLogger.
globalLoggerOptions loggerOptions

// contextualLogger defines whether globalLogger may get called
// directly.
contextualLogger bool

// klogLogger is used as fallback for logging through the normal klog code
// when no Logger is set.
klogLogger logr.Logger = logr.New(&klogger{})
Expand Down Expand Up @@ -137,15 +133,6 @@ type loggerOptions struct {
flush func()
}

// SetContextualLogger does the same as SetLogger, but in addition the
// logger may also get called directly by code that retrieves it
// with FromContext, TODO or Background. The logger therefore must
// implements its own verbosity checking.
func SetContextualLogger(logger logr.Logger) {
globalLogger = &logger
contextualLogger = true
}

// ClearLogger removes a backing Logger implementation if one was set earlier
// with SetLogger.
//
Expand Down

0 comments on commit fb03dab

Please sign in to comment.