From 1819c4932136bb1b42bcbe441a53094c5f5db10a Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Tue, 7 Nov 2023 14:35:18 -0800 Subject: [PATCH 1/2] fix logging bug --- cli/operator/register.go | 4 ++-- cli/operator/update.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 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..97731a13 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,7 +119,7 @@ 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") return nil From 816c470bf0de1e14dd11ec375e4cc6ca3586471a Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Tue, 7 Nov 2023 14:38:12 -0800 Subject: [PATCH 2/2] update --- cli/operator/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/operator/update.go b/cli/operator/update.go index 97731a13..b84824f1 100644 --- a/cli/operator/update.go +++ b/cli/operator/update.go @@ -121,7 +121,7 @@ func UpdateCmd(p prompter.Prompter) *cobra.Command { } 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 }, }