Skip to content

Commit

Permalink
add StacktraceLevel for zapr
Browse files Browse the repository at this point in the history
Signed-off-by: qiankunli <bert.li.qiankun@gmail.com>

add empty line

Signed-off-by: qiankunli <bert.li.qiankun@gmail.com>

remove empty line

Signed-off-by: qiankunli <bert.li.qiankun@gmail.com>
  • Loading branch information
qiankunli authored and qiankunli committed Dec 27, 2021
1 parent b51bfda commit f9e6525
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cmd/training-operator.v1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/kubeflow/training-operator/pkg/config"
controller_v1 "github.com/kubeflow/training-operator/pkg/controller.v1"

"go.uber.org/zap/zapcore"
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -79,7 +80,8 @@ func main() {
config.PyTorchInitContainerTemplateFileDefault, "The template file for pytorch init container")

opts := zap.Options{
Development: true,
Development: true,
StacktraceLevel: zapcore.DPanicLevel,
}
opts.BindFlags(flag.CommandLine)
flag.Parse()
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/onsi/gomega v1.10.2
github.com/prometheus/client_golang v1.10.0
github.com/sirupsen/logrus v1.6.0
go.uber.org/zap v1.15.0
k8s.io/api v0.19.9
k8s.io/apimachinery v0.19.9
k8s.io/client-go v0.19.9
Expand Down Expand Up @@ -65,7 +66,6 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/multierr v1.5.0 // indirect
go.uber.org/zap v1.15.0 // indirect
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
golang.org/x/mod v0.3.0 // indirect
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
Expand Down

0 comments on commit f9e6525

Please sign in to comment.