Skip to content

Commit

Permalink
chore: refactor logging
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno committed May 9, 2021
1 parent 55c266f commit 1902979
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ var rootCmd = &cobra.Command{
Long: "Scrape the data about the validators set, specific validators or wallets in the Cosmos network.",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
if ConfigPath == "" {
log.Trace().Msg("Config file not provided")
log.Info().Msg("Config file not provided")
setBechPrefixes(cmd)
return nil
}

log.Trace().Msg("Config file provided")
log.Info().Msg("Config file provided")

viper.SetConfigFile(ConfigPath)
if err := viper.ReadInConfig(); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ func ValidatorsHandler(w http.ResponseWriter, r *http.Request, grpcConn *grpc.Cl
return
}

sublogger.Info().
sublogger.Debug().
Int("signingLength", len(signingInfos.Info)).
Int("validatorsLength", len(validators.Validators)).
Msg("Length")
Msg("Signing info length")

sublogger.Debug().
Float64("request-time", time.Since(queryStart).Seconds()).
Expand Down

0 comments on commit 1902979

Please sign in to comment.