mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd, internal, signer: split logs
This commit is contained in:
parent
8c4002c655
commit
88c6ffd066
3 changed files with 10 additions and 3 deletions
|
|
@ -312,8 +312,11 @@ func accountCreate(ctx *cli.Context) error {
|
|||
if err != nil {
|
||||
utils.Fatalf("Failed to create account: %v", err)
|
||||
}
|
||||
fmt.Printf("Your new key is generated. Please backup the key file: %s\n", account.URL.Path)
|
||||
fmt.Printf("Your new key was generated\n")
|
||||
fmt.Printf("Address: {%x}\n", account.Address)
|
||||
fmt.Printf("Please backup your key file!\n")
|
||||
fmt.Printf("Path: {%s}\n", account.URL.Path)
|
||||
fmt.Printf("Please remember your password!\n")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -295,7 +295,9 @@ func (s *PrivateAccountAPI) DeriveAccount(url string, path string, pin *bool) (a
|
|||
func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error) {
|
||||
acc, err := fetchKeystore(s.am).NewAccount(password)
|
||||
if err == nil {
|
||||
log.Info("Your new key is generated. Please backup the key file", "path", acc.URL.Path)
|
||||
log.Info("Your new key was generated", "address", acc.Address)
|
||||
log.Warn("Please backup your key file!", "path", acc.URL.Path)
|
||||
log.Warn("Please remember your password!")
|
||||
return acc.Address, nil
|
||||
}
|
||||
return common.Address{}, err
|
||||
|
|
|
|||
|
|
@ -392,7 +392,9 @@ func (api *SignerAPI) New(ctx context.Context) (common.Address, error) {
|
|||
} else {
|
||||
// No error
|
||||
acc, err := be[0].(*keystore.KeyStore).NewAccount(resp.Text)
|
||||
log.Info("Your new key is generated. Please backup the key file", "path", acc.URL.Path)
|
||||
log.Info("Your new key was generated", "address", acc.Address)
|
||||
log.Warn("Please backup your key file!", "path", acc.URL.Path)
|
||||
log.Warn("Please remember your password!")
|
||||
return acc.Address, err
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue