From 88c6ffd066bcff0566237cdee1334e71a414511b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kurk=C3=B3=20Mih=C3=A1ly?= Date: Thu, 25 Apr 2019 14:10:27 +0300 Subject: [PATCH] cmd, internal, signer: split logs --- cmd/geth/accountcmd.go | 5 ++++- internal/ethapi/api.go | 4 +++- signer/core/api.go | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cmd/geth/accountcmd.go b/cmd/geth/accountcmd.go index 666ed63b12..8a23541fec 100644 --- a/cmd/geth/accountcmd.go +++ b/cmd/geth/accountcmd.go @@ -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 } diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 6b6ead7f12..bb387df7a1 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -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 diff --git a/signer/core/api.go b/signer/core/api.go index 0d18ac6b09..783aaece46 100644 --- a/signer/core/api.go +++ b/signer/core/api.go @@ -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 } }