From 513127cd8f881940b9be8acfaea8f1f573dc7873 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Tue, 20 Dec 2022 10:54:03 +0530 Subject: [PATCH] chg : use standard logging --- internal/cli/server/config.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/cli/server/config.go b/internal/cli/server/config.go index 1d011cc665..83971cf217 100644 --- a/internal/cli/server/config.go +++ b/internal/cli/server/config.go @@ -937,13 +937,13 @@ func unlockAccount(ks *keystore.KeyStore, address string, i int, passwords []str } func ambiguousAddrRecovery(ks *keystore.KeyStore, err *keystore.AmbiguousAddrError, auth string) accounts.Account { - fmt.Printf("Multiple key files exist for address %x:\n", err.Addr) + log.Warn("Multiple key files exist for", "address", err.Addr) for _, a := range err.Matches { - fmt.Println(" ", a.URL) + log.Info("Multiple keys", "file", a.URL) } - fmt.Println("Testing your password against all of them...") + log.Info("Testing your password against all of them...") var match *accounts.Account @@ -959,8 +959,8 @@ func ambiguousAddrRecovery(ks *keystore.KeyStore, err *keystore.AmbiguousAddrErr utils.Fatalf("None of the listed files could be unlocked.") } - fmt.Printf("Your password unlocked %s\n", match.URL) - fmt.Println("In order to avoid this warning, you need to remove the following duplicate key files:") + log.Info("Your password unlocked", "key", match.URL) + log.Warn("In order to avoid this warning, you need to remove the following duplicate key files:") for _, a := range err.Matches { if a != *match {