log html instead of info

pull/3058/head
yann300 2 years ago committed by Aniket
parent 16cedb3494
commit 649efccf26
  1. 12
      apps/remix-ide/src/blockchain/blockchain.js

@ -674,8 +674,9 @@ export class Blockchain extends Plugin {
const hhlogs = await this.web3().eth.getHHLogsForTx(txResult.transactionHash)
if (hhlogs && hhlogs.length) {
let finalLogs = '<b>console.log:</b>\n'
for (const log of hhlogs) {
let finalLogs = <div><div><b>console.log:</b></div>
{
hhlogs.map((log) => {
let formattedLog
// Hardhat implements the same formatting options that can be found in Node.js' console.log,
// which in turn uses util.format: https://nodejs.org/dist/latest-v12.x/docs/api/util.html#util_util_format_format_args
@ -686,10 +687,11 @@ export class Blockchain extends Plugin {
} else {
formattedLog = log.join(' ')
}
finalLogs = finalLogs + '&emsp;' + formattedLog + '\n'
}
return <div>{formattedLog}</div>
})}
</div>
_paq.push(['trackEvent', 'udapp', 'hardhat', 'console.log'])
this.call('terminal', 'log', { type: 'info', value: finalLogs })
this.call('terminal', 'logHtml', finalLogs)
}
execResult = await this.web3().eth.getExecutionResultFromSimulator(txResult.transactionHash)
if (execResult) {

Loading…
Cancel
Save