Consensys / mythx-cli

A command line interface for the MythX smart contract security analysis API
https://mythx-cli.readthedocs.io/
MIT License
84 stars 29 forks source link

Print log messages to stderr when rendering reports #95

Closed muellerberndt closed 4 years ago

muellerberndt commented 4 years ago

MythX CLI version: 0.6.5 Python version: 3.7.4 Operating System: Mac

Description

When rendering reports console logs are printed along with the report output. If I redirect the output into a file, I then have to manually delete the first line in the file e.g.

$ mythx render --markdown 0d07d850-7114-40c2-a544-8cf09e77da84 > ~/Desktop/report.md

Produces:

Fetching report for analysis 0d07d850-7114-40c2-a544-8cf09e77da84
(... actual markdown content ...)

I'd prefer if there was either no logging output in render mode or if it was printed to stderr so it doesn't end up in the file.

dmuhs commented 4 years ago

Thanks for reporting! I would like to keep the log messages in the render command to give the user a sense of progress - to assure them the rendering is still in progress. I have relayed the messages to stderr in https://github.com/dmuhs/mythx-cli/pull/99 This will be available in the next release 0.6.6