Skip to content

Commit

Permalink
test: init log level when ostracon config isn't created
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed Feb 6, 2023
1 parent 7583564 commit efa9ccb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,14 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command, customAppConfigTemplate s
isLogPlain = true
}

logLevel := serverCtx.Viper.GetString(flags.FlagLogLevel)
if logLevel == "" {
logLevel = ostcfg.DefaultPackageLogLevels()
}

zerologCfg := ostlog.NewZeroLogConfig(
isLogPlain,
serverCtx.Viper.GetString(flags.FlagLogLevel),
logLevel,
serverCtx.Viper.GetString(flags.FlagLogPath),
serverCtx.Viper.GetInt(flags.FlagLogMaxAge),
serverCtx.Viper.GetInt(flags.FlagLogMaxSize),
Expand Down

0 comments on commit efa9ccb

Please sign in to comment.