From 765875112c61e7d3b6d430b0e701712a46feeefb Mon Sep 17 00:00:00 2001 From: v-pashas Date: Tue, 3 Dec 2024 21:55:57 +0530 Subject: [PATCH] Set JSON as default formatter --- cmd/rollouts-controller/main.go | 2 +- test/cmd/trafficrouter-plugin-sample/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/rollouts-controller/main.go b/cmd/rollouts-controller/main.go index ad7190c585..1622e7865b 100644 --- a/cmd/rollouts-controller/main.go +++ b/cmd/rollouts-controller/main.go @@ -84,7 +84,7 @@ func newCommand() *cobra.Command { } setLogLevel(logLevel) if logFormat != "" { - log.SetFormatter(createFormatter(logFormat)) + log.SetFormatter(createFormatter("json")) } logutil.SetKLogLogger(log.New()) logutil.SetKLogLevel(klogLevel) diff --git a/test/cmd/trafficrouter-plugin-sample/main.go b/test/cmd/trafficrouter-plugin-sample/main.go index 05122fbe0f..cae88d27a5 100644 --- a/test/cmd/trafficrouter-plugin-sample/main.go +++ b/test/cmd/trafficrouter-plugin-sample/main.go @@ -23,7 +23,7 @@ func main() { logCtx := log.WithFields(log.Fields{"plugin": "trafficrouter"}) setLogLevel("debug") - log.SetFormatter(createFormatter("text")) + log.SetFormatter(createFormatter("json")) rpcPluginImp := &plugin.RpcPlugin{ LogCtx: logCtx,