Skip to content

Commit

Permalink
GROW-942 Setup logging level on badges (#612)
Browse files Browse the repository at this point in the history
* setup logging lv on badges

* refactor setting logging lv on badges
  • Loading branch information
tabakuj authored Jul 12, 2023
1 parent 608b427 commit ea67ee8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion protocol/badgegenerator/badgeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ func CreateBadgeGeneratorCobraCommand() *cobra.Command {

logFormat := viper.GetString(flags.FlagLogFormat)
utils.JsonFormat = logFormat == "json"
logLevel, err := cmd.Flags().GetString(flags.FlagLogLevel)
if err != nil {
utils.LavaFormatFatal("failed to read log level flag", err)
}
utils.LoggingLevel(logLevel)

RunBadgeServer(cmd, v)

Expand Down Expand Up @@ -99,7 +104,6 @@ func RunBadgeServer(cmd *cobra.Command, v *viper.Viper) {
if err != nil {
utils.LavaFormatFatal("Error in open listener", err)
}
// set up the grpc server

grpcUrl := v.GetString(GrpcUrlEnvironmentVariable)
chainId := v.GetString(LavaChainIDEnvironmentVariable)
Expand Down

0 comments on commit ea67ee8

Please sign in to comment.