Skip to content

Commit 680b8b4

Browse files
authored
refactor: enhance logging options by adding RFC3339NanoTimeEncoder (#34)
1 parent efb3b4a commit 680b8b4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cmd/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424

2525
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
2626
// to ensure that exec-entrypoint and run can make use of them.
27+
"go.uber.org/zap/zapcore"
2728
_ "k8s.io/client-go/plugin/pkg/client/auth"
2829

2930
"k8s.io/apimachinery/pkg/runtime"
@@ -83,7 +84,9 @@ func main() {
8384
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
8485
opts := zap.Options{
8586
Development: true,
87+
TimeEncoder: zapcore.RFC3339NanoTimeEncoder,
8688
}
89+
8790
opts.BindFlags(flag.CommandLine)
8891
flag.Parse()
8992

0 commit comments

Comments
 (0)