Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetContextualLogger: remove unintentionally merged API call #308

Merged
merged 1 commit into from Mar 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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