javascript-opentimestamps
javascript-opentimestamps copied to clipboard
Convert calendar console logs to debug logs
When using this library in applications, it annoyingly litters stdout with debug info.
Change the "Submitting to remote calendar" console logs to debug logs. To enable these logs, pass DEBUG=opentimestamps before running the application.
Now when you use the client for stamping you should see this:
$ node ots-cli.js stamp LICENSE
The timestamp proof 'LICENSE.ots' has been created!
With DEBUG=opentimestamps you see this:
$ DEBUG=opentimestamps node ots-cli.js stamp LICENSE
opentimestamps Submitting to remote calendar https://a.pool.opentimestamps.org +0ms
opentimestamps Submitting to remote calendar https://b.pool.opentimestamps.org +1ms
opentimestamps Submitting to remote calendar https://a.pool.eternitywall.com +0ms
opentimestamps Submitting to remote calendar https://ots.btc.catallaxy.com +1ms
The timestamp proof 'LICENSE.ots' already exists
I've left the other logs for now, as I do not see them when using this for timestamping in other applications, and they are probably useful when using ots-cli.js
Nice stuff, there is a verbose options actually used only on info command, do you think debug var is to prefer rather than verbose option?
Nice stuff, there is a verbose options actually used only on info command, do you think debug var is to prefer rather than verbose option?
yeah that could work, I'm not currently using this library at the moment but will revisit this PR next time I do.