chg : use standard logging

This commit is contained in:
Shivam Sharma 2022-12-20 10:54:03 +05:30
parent 828801f9d8
commit 513127cd8f

View file

@ -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 {