Skip to content

Commit

Permalink
only print stacktraces on panics, as the trace for reconciling errors…
Browse files Browse the repository at this point in the history
… is pretty much useless

On-behalf-of: @SAP christoph.mewes@sap.com
  • Loading branch information
xrstf committed Jan 27, 2025
1 parent 31c77e8 commit 3a0b91c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1"
"github.com/go-logr/zapr"
"go.uber.org/zap/zapcore"

"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
Expand Down Expand Up @@ -71,7 +72,8 @@ func main() {
flag.BoolVar(&enableHTTP2, "enable-http2", false,
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
opts := zap.Options{
Development: true,
Development: true,
StacktraceLevel: zapcore.PanicLevel,
}
opts.BindFlags(flag.CommandLine)
flag.Parse()
Expand Down

0 comments on commit 3a0b91c

Please sign in to comment.