stoqey / ibkr

Interactive Brokers wrapper 🚩
MIT License
59 stars 11 forks source link

Please stop using console.log and chalk #12

Closed krambox closed 4 years ago

krambox commented 4 years ago

Currently the ibkr writes a lot of text with chalk on the console, which cannot be deactivated. Better would be an output with debug or a deactivation of the console log.

anri-asaturov commented 4 years ago

I can offer to write a configureable console.log wrapper or a simple logger and replace all log lines, if maintainers approve.

ceddybi commented 4 years ago

@krambox thank you note, please help add the configuration @anri-asaturov

anri-asaturov commented 4 years ago

@ceddybi so you prefer to have a console.log wrapper, so you can continue using console.log as is without rewriting existing lines, or you want a logger module?

ceddybi commented 4 years ago

@anri-asaturov thank you please add logger if possible

ceddybi commented 4 years ago

am running a POC, that's why there is lots of iterations and console.log, I wasn't aware others might be using it, with your help we can make it production-ready, there's a few other missing things like Orders but for that am working on it

krambox commented 4 years ago

I suggest to use debug (https://www.npmjs.com/package/debug) instead of console.log This is a good way to customize the output.

anri-asaturov commented 4 years ago

https://github.com/stoqey/ibkr/pull/13