diff --git a/cmd/zetaclientd/init.go b/cmd/zetaclientd/init.go index d48722ee52..161b968682 100644 --- a/cmd/zetaclientd/init.go +++ b/cmd/zetaclientd/init.go @@ -79,7 +79,7 @@ func Initialize(_ *cobra.Command, _ []string) error { configData.ZetaCoreURL = initArgs.zetacoreURL configData.AuthzHotkey = initArgs.authzHotkey configData.AuthzGranter = initArgs.authzGranter - configData.LogLevel = zerolog.Level(initArgs.level) + configData.LogLevel = initArgs.level configData.LogFormat = initArgs.logFormat configData.LogSampler = initArgs.logSampler configData.P2PDiagnostic = initArgs.p2pDiagnostic diff --git a/cmd/zetaclientd/main.go b/cmd/zetaclientd/main.go index 570e7eb0fc..a51fb40d82 100644 --- a/cmd/zetaclientd/main.go +++ b/cmd/zetaclientd/main.go @@ -55,9 +55,9 @@ func InitLogger(cfg *config.Config) zerolog.Logger { var logger zerolog.Logger switch cfg.LogFormat { case "json": - logger = zerolog.New(os.Stdout).Level(cfg.LogLevel).With().Timestamp().Logger() + logger = zerolog.New(os.Stdout).Level(zerolog.Level(cfg.LogLevel)).With().Timestamp().Logger() case "text": - logger = zerolog.New(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}).Level(cfg.LogLevel).With().Timestamp().Logger() + logger = zerolog.New(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}).Level(zerolog.Level(cfg.LogLevel)).With().Timestamp().Logger() default: logger = zerolog.New(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}) } diff --git a/zetaclient/config/types.go b/zetaclient/config/types.go index bd0dce248f..01b02e3296 100644 --- a/zetaclient/config/types.go +++ b/zetaclient/config/types.go @@ -4,7 +4,6 @@ import ( "encoding/json" "github.com/ethereum/go-ethereum/ethclient" - "github.com/rs/zerolog" "github.com/zeta-chain/zetacore/common" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -66,7 +65,7 @@ type Config struct { Peer string PublicIP string LogFormat string - LogLevel zerolog.Level + LogLevel int8 // zerolog level LogSampler bool PreParamsPath string Keygen zetaObserverTypes.Keygen