Skip to content

Commit

Permalink
Use JSON logger with ISO8601 time encoder for controller manager
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-s-rao committed Feb 10, 2023
1 parent 1ee8309 commit 53415a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package main

import (
"flag"
"go.uber.org/zap/zapcore"
"os"
"time"

Expand Down Expand Up @@ -86,7 +87,10 @@ func main() {

flag.Parse()

ctrl.SetLogger(zap.New(zap.UseDevMode(true)))
ctrl.SetLogger(zap.New(func(options *zap.Options) {
options.Development = false
options.TimeEncoder = zapcore.ISO8601TimeEncoder
}))

ctx := ctrl.SetupSignalHandler()

Expand Down

0 comments on commit 53415a5

Please sign in to comment.