INNER CODE UNIT · Go
main
aws/eks-anywhere · manager/main.go:102
func main() {
config := newConfig()
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
initFlags(pflag.CommandLine, config)
pflag.Parse()
// Temporary logger for initialization
setupLog := ctrl.Log.WithName("setup")
if err := logsv1.ValidateAndApply(config.logging, nil); err != nil {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
}
// klog.Background will automatically use the right logger.
ctrl.SetLogger(klog.Background())
// Once controller-runtime logger has been setup correctly, retrieve again
setupLog = ctrl.Log.WithName("setup")