Unify log fields (#13654)

* unify fields

* fix tests
This commit is contained in:
Radosław Kapka
2024-02-22 23:40:36 +01:00
committed by GitHub
parent 7a9608ea20
commit 0b261cba5e
45 changed files with 190 additions and 190 deletions

View File

@@ -83,7 +83,7 @@ func zipKeystoresToOutputDir(keystoresToBackup []*keymanager.Keystore, outputDir
}
}
log.WithField(
"backup-path", archivePath,
"backupPath", archivePath,
).Infof("Successfully backed up %d accounts", len(keystoresToBackup))
return nil
}

View File

@@ -247,7 +247,7 @@ func OpenOrCreateNewWallet(cliCtx *cli.Context) (*Wallet, error) {
if err := w.SaveWallet(); err != nil {
return nil, errors.Wrap(err, "could not save wallet to disk")
}
log.WithField("wallet-path", walletDir).Info(
log.WithField("walletPath", walletDir).Info(
"Successfully created new wallet",
)
return w, nil

View File

@@ -36,7 +36,7 @@ func (acm *CLIManager) WalletCreate(ctx context.Context) (*wallet.Wallet, error)
if err != nil {
return nil, err
}
log.WithField("--wallet-dir", acm.walletDir).Info(
log.WithField("walletDir", acm.walletDir).Info(
"Successfully created wallet with ability to import keystores",
)
case keymanager.Derived:
@@ -50,7 +50,7 @@ func (acm *CLIManager) WalletCreate(ctx context.Context) (*wallet.Wallet, error)
); err != nil {
return nil, errors.Wrap(err, "could not initialize wallet")
}
log.WithField("--wallet-dir", acm.walletDir).Info(
log.WithField("walletDir", acm.walletDir).Info(
"Successfully created HD wallet from mnemonic and regenerated accounts",
)
case keymanager.Web3Signer:

View File

@@ -48,7 +48,7 @@ func (acm *CLIManager) WalletRecover(ctx context.Context) (*wallet.Wallet, error
if err := km.RecoverAccountsFromMnemonic(ctx, acm.mnemonic, acm.mnemonicLanguage, acm.mnemonic25thWord, acm.numAccounts); err != nil {
return nil, err
}
log.WithField("wallet-path", w.AccountsDir()).Infof(
log.WithField("walletPath", w.AccountsDir()).Infof(
"Successfully recovered HD wallet with %d accounts. Please use `accounts list` to view details for your accounts",
acm.numAccounts,
)

View File

@@ -271,8 +271,8 @@ func (c *ValidatorClient) initializeFromCLI(cliCtx *cli.Context, router *mux.Rou
c.wallet = w
// TODO(#9883) - Remove this when we have a better way to handle this.
log.WithFields(logrus.Fields{
"wallet": w.AccountsDir(),
"keymanager-kind": w.KeymanagerKind().String(),
"wallet": w.AccountsDir(),
"keymanagerKind": w.KeymanagerKind().String(),
}).Info("Opened validator wallet")
}
}