From 9c9304d81e3e364b12e84ed8a9b1be01d3694d0b Mon Sep 17 00:00:00 2001 From: Julien Cassis Date: Sun, 21 Apr 2024 09:02:03 -0400 Subject: [PATCH] remove logging json option, bumped to new logging fix --- cmd/substreams-sink-kv/main.go | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/cmd/substreams-sink-kv/main.go b/cmd/substreams-sink-kv/main.go index ecc3d21..999b90e 100644 --- a/cmd/substreams-sink-kv/main.go +++ b/cmd/substreams-sink-kv/main.go @@ -42,7 +42,11 @@ func main() { } func preStart(_ *cobra.Command, _ []string) error { - logging.InstantiateLoggers(loggingOptions(viper.GetString("global-log-format"))...) + logging.InstantiateLoggers( + logging.WithLogLevelSwitcherServerAutoStart(), + logging.WithDefaultLevel(zap.InfoLevel), + logging.WithConsoleToStderr(), + ) delay := viper.GetDuration("global-delay-before-start") if delay > 0 { @@ -67,17 +71,3 @@ func preStart(_ *cobra.Command, _ []string) error { return nil } - -func loggingOptions(logFormat string) []logging.InstantiateOption { - options := []logging.InstantiateOption{ - logging.WithLogLevelSwitcherServerAutoStart(), - logging.WithDefaultLevel(zap.InfoLevel), - logging.WithConsoleToStderr(), - } - - if logFormat == "stackdriver" || logFormat == "json" { - options = append(options, logging.WithProductionLogger()) - } - - return options -}