From f6c3b7e15c8b55386b025ac6abb22d49f2f63bfc Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Tue, 7 Nov 2023 14:53:18 -0800 Subject: [PATCH] fix logging bug (#139) * fix logging bug * update --- cli/operator/register.go | 4 ++-- cli/operator/update.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/operator/register.go b/cli/operator/register.go index 305032bc..7cef7ccd 100644 --- a/cli/operator/register.go +++ b/cli/operator/register.go @@ -160,7 +160,7 @@ func RegisterCmd(p prompter.Prompter) *cobra.Command { if err != nil { return err } - logger.Info("Operator registration transaction at:", getTransactionLink(receipt.TxHash.String(), &operatorCfg.ChainId)) + logger.Infof("Operator registration transaction at: %s", getTransactionLink(receipt.TxHash.String(), &operatorCfg.ChainId)) } else { logger.Info("Operator is already registered") @@ -170,7 +170,7 @@ func RegisterCmd(p prompter.Prompter) *cobra.Command { if err != nil { return err } - logger.Info("Operator bls key added transaction at:", getTransactionLink(receipt.TxHash.String(), &operatorCfg.ChainId)) + logger.Infof("Operator bls key added transaction at: %s", getTransactionLink(receipt.TxHash.String(), &operatorCfg.ChainId)) logger.Info("Operator is registered and bls key added successfully") return nil diff --git a/cli/operator/update.go b/cli/operator/update.go index acac4ebe..b84824f1 100644 --- a/cli/operator/update.go +++ b/cli/operator/update.go @@ -77,7 +77,7 @@ func UpdateCmd(p prompter.Prompter) *cobra.Command { return nil }, RunE: func(cmd *cobra.Command, args []string) error { - llog, err := eigensdkLogger.NewZapLogger(eigensdkLogger.Development) + logger, err := eigensdkLogger.NewZapLogger(eigensdkLogger.Development) if err != nil { return err } @@ -97,7 +97,7 @@ func UpdateCmd(p prompter.Prompter) *cobra.Command { common.HexToAddress(operatorCfg.BlsPublicKeyCompendiumAddress), ethClient, ethClient, - llog, + logger, ) if err != nil { return err @@ -108,7 +108,7 @@ func UpdateCmd(p prompter.Prompter) *cobra.Command { elContractsClient, ethClient, localSigner, - llog, + logger, noopMetrics, ) @@ -119,9 +119,9 @@ func UpdateCmd(p prompter.Prompter) *cobra.Command { if err != nil { return err } - fmt.Println("Operator details updated at:", getTransactionLink(receipt.TxHash.String(), &operatorCfg.ChainId)) + logger.Infof("Operator details updated at: %s", getTransactionLink(receipt.TxHash.String(), &operatorCfg.ChainId)) - fmt.Println("Operator updated successfully") + logger.Info("Operator updated successfully") return nil }, }