Skip to content

Commit

Permalink
disable stack traces at error level
Browse files Browse the repository at this point in the history
Signed-off-by: Divyansh Kamboj <[email protected]>
  • Loading branch information
weirdwiz committed May 5, 2022
1 parent 64c33c5 commit e07b1bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
multiclusterv1alpha1 "github.com/red-hat-storage/odf-multicluster-orchestrator/api/v1alpha1"
"github.com/red-hat-storage/odf-multicluster-orchestrator/console"
"github.com/spf13/cobra"
"go.uber.org/zap/zapcore"
"golang.org/x/sync/errgroup"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
Expand Down Expand Up @@ -61,7 +62,9 @@ func (o *ManagerOptions) AddFlags(cmd *cobra.Command) {
flags.BoolVar(&o.EnableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
o.ZapOpts = zap.Options{}
o.ZapOpts = zap.Options{
StacktraceLevel: zapcore.PanicLevel,
}
o.ZapOpts.BindFlags(flag.CommandLine)
}

Expand Down

0 comments on commit e07b1bd

Please sign in to comment.