Unverified Commit 0de75a87 authored by bin.pan's avatar bin.pan Committed by GitHub
Browse files

fix: Initialize logger earlier to capture startup logs (#3570)


Signed-off-by: default avatarbin <bin.pan@daocloud.io>
parent 32bfc0f3
......@@ -208,6 +208,7 @@ func main() {
}
opts.BindFlags(flag.CommandLine)
flag.Parse()
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
if restrictedNamespace == "" && plannerClusterRoleName == "" {
setupLog.Error(nil, "planner-cluster-role-name is required in cluster-wide mode")
......@@ -277,7 +278,6 @@ func main() {
}
mainCtx := ctrl.SetupSignalHandler()
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
// if the enable-http2 flag is false (the default), http/2 should be disabled
// due to its vulnerabilities. More specifically, disabling http/2 will
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment