We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f4a377 commit 9319337Copy full SHA for 9319337
main.go
@@ -12,6 +12,7 @@ package main
12
import (
13
"flag"
14
"fmt"
15
+ "k8s.io/klog/v2"
16
"os"
17
"regexp"
18
"strings"
@@ -73,7 +74,10 @@ func main() {
73
74
75
flag.Parse()
76
- ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
77
+ logger := zap.New(zap.UseFlagOptions(&opts))
78
+ ctrl.SetLogger(logger)
79
+ // https://github.com/kubernetes-sigs/controller-runtime/issues/1420#issuecomment-794525248
80
+ klog.SetLogger(logger.WithName("messaging-topology-operator"))
81
82
operatorNamespace := os.Getenv(controllers.OperatorNamespaceEnvVar)
83
if operatorNamespace == "" {
0 commit comments