mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use loglevel for more logs
This commit is contained in:
parent
527068b84e
commit
a3149c1752
@ -341,9 +341,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
console.error('Error in RPC response:\n', response.error)
|
||||
}
|
||||
if (request.isMetamaskInternal) return
|
||||
if (global.METAMASK_DEBUG) {
|
||||
console.log(`RPC (${originDomain}):`, request, '->', response)
|
||||
}
|
||||
log.info(`RPC (${originDomain}):`, request, '->', response)
|
||||
}
|
||||
}
|
||||
|
||||
@ -591,9 +589,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
|
||||
// Log blocks
|
||||
logBlock (block) {
|
||||
if (global.METAMASK_DEBUG) {
|
||||
console.log(`BLOCK CHANGED: #${block.number.toString('hex')} 0x${block.hash.toString('hex')}`)
|
||||
}
|
||||
log.info(`BLOCK CHANGED: #${block.number.toString('hex')} 0x${block.hash.toString('hex')}`)
|
||||
this.verifyNetwork()
|
||||
}
|
||||
|
||||
@ -682,9 +678,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
this.setNetworkState('loading')
|
||||
return
|
||||
}
|
||||
if (global.METAMASK_DEBUG) {
|
||||
console.log('web3.getNetwork returned ' + network)
|
||||
}
|
||||
log.info('web3.getNetwork returned ' + network)
|
||||
this.setNetworkState(network)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user