Skip to content

Commit 3c5adf4

Browse files
committed
Switch alias.go to new logging pkg layout
This switches alias.go over to the new logging layout. In order to avoid alias.go pulling in Zap, we don't put ZapLogger in alias.go any more. Practically, this is probably fine. It means an extra line in main.go, but it's just one, and allows people to avoid extraneous dependencies.
1 parent 7207db7 commit 3c5adf4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

alias.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
2727
"sigs.k8s.io/controller-runtime/pkg/manager"
2828
"sigs.k8s.io/controller-runtime/pkg/reconcile"
29-
"sigs.k8s.io/controller-runtime/pkg/runtime/log"
29+
"sigs.k8s.io/controller-runtime/pkg/log"
3030
"sigs.k8s.io/controller-runtime/pkg/runtime/scheme"
3131
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
3232
)
@@ -126,10 +126,4 @@ var (
126126

127127
// SetLogger sets a concrete logging implementation for all deferred Loggers.
128128
SetLogger = log.SetLogger
129-
130-
// ZapLogger is a Logger implementation.
131-
// If development is true, a Zap development config will be used
132-
// (stacktraces on warnings, no sampling), otherwise a Zap production
133-
// config will be used (stacktraces on errors, sampling).
134-
ZapLogger = log.ZapLogger
135129
)

0 commit comments

Comments
 (0)