accounts, cmd: port packages over to the new logging system

This commit is contained in:
Péter Szilágyi
2017-02-22 16:58:00 +02:00
parent 61e6bb1247
commit 23a5d64fd0
10 changed files with 74 additions and 70 deletions

View File

@ -27,6 +27,7 @@ import (
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/log"
"github.com/karalabe/hid"
)
@ -120,7 +121,7 @@ func (hub *LedgerHub) refreshWallets() {
}
// If there are no more wallets or the device is before the next, wrap new wallet
if len(hub.wallets) == 0 || hub.wallets[0].URL().Cmp(url) > 0 {
wallet := &ledgerWallet{url: &url, info: ledger}
wallet := &ledgerWallet{url: &url, info: ledger, logger: log.New("url", url)}
events = append(events, accounts.WalletEvent{Wallet: wallet, Arrive: true})
wallets = append(wallets, wallet)