Skip to content

Commit

Permalink
Use iso8601 format for logging timestamps (grafana#272)
Browse files Browse the repository at this point in the history
Resolves: grafana#269

Signed-off-by: Andreas Gerstmayr <[email protected]>
  • Loading branch information
andreasgerstmayr authored Mar 3, 2023
1 parent 54c89ec commit 152e8c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
openshiftoperatorv1 "github.com/openshift/api/operator/v1"
routev1 "github.com/openshift/api/route/v1"
"github.com/spf13/cobra"
"go.uber.org/zap/zapcore"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
Expand Down Expand Up @@ -48,6 +49,7 @@ func readConfig(cmd *cobra.Command, configFile string) error {

opts := zap.Options{
Development: true,
TimeEncoder: zapcore.ISO8601TimeEncoder,
}
opts.BindFlags(flag.CommandLine)
flag.Parse()
Expand Down

0 comments on commit 152e8c5

Please sign in to comment.