nervosnetwork / ckb-cli

CKB command line interface
MIT License
55 stars 35 forks source link

Is it more appropriate to use stderr for some debug log in the apply-txs command with the --output-format json option? #559

Closed gpBlockchain closed 1 year ago

gpBlockchain commented 1 year ago

https://github.com/nervosnetwork/ckb-cli/blob/a7b15b62b47ec0ac562b0c1ea809aff279896ada/src/subcommands/deploy/mod.rs#L502C1-L503C1 Is it more appropriate to use stderr for [send cell transaction] and [send dep group transaction] print ?

./ckb-cli deploy apply-txs --migration-dir ./migrations --info-file /tmp/tx-1687837272970787000.json --output-format json
> [send cell transaction]: 0x79369dd9df9cd00f72ae24072f9d07ec87fce72a7ac1fb977d8c1c6845894d7e
> [send dep group transaction]: 0x0ce986351dcb730ec7dee69155264b517086a513cfa43d907e9089c7ec8bea91
{
  "cell_tx": "0x79369dd9df9cd00f72ae24072f9d07ec87fce72a7ac1fb977d8c1c6845894d7e",
  "dep_group_tx": "0x0ce986351dcb730ec7dee69155264b517086a513cfa43d907e9089c7ec8bea91"
}
eval-exec commented 1 year ago

I think it can use eprintln to print log to stderr: eprintln!("> [send cell transaction]: {:#x}", calculated_tx_hash);