node-yahoo-finance2
node-yahoo-finance2 copied to clipboard
Improve logging / debugging (umbrella issue)
I'm aware of a lot of mildly annoying console output when using the library, we've simply been focusing on bigger issues (predominantly: keeping the library working amongst frequent changes on Yahoo's ends, or bigger restructurings that can help make the library more manageable, like validation and testing).
Also, of course, logging is entirely user configurable, see docs/other/setGlobalConfig.md#logger. But it would be nice to have good defaults out of the box.
So, once we get to this (and feel free to subscribe to this issue for when we do), the guiding principles should be:
- Don't show anything by default
- "Conditional logging"... store some stuff in a buffer and only show it if there's an error.
- On errors, ALWAYS give the library version, as old versions / npm issues are some of the most common problems.
- Think sensibly about the different debug levels and how to control them.
- "notice" lib
- common code to show certain notices once per load
- ability to suppress these notices in advice
Those cover what I've had in mind for a while, anyone feel free to chime in with further ideas.