diff --git a/contextual.go b/contextual.go index bb038089..33743ffb 100644 --- a/contextual.go +++ b/contextual.go @@ -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{}) @@ -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. //