Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve logging / debugging (umbrella issue) #783

Open
gadicc opened this issue Jun 19, 2024 · 0 comments
Open

Improve logging / debugging (umbrella issue) #783

gadicc opened this issue Jun 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@gadicc
Copy link
Owner

gadicc commented Jun 19, 2024

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:

  1. Don't show anything by default
  2. "Conditional logging"... store some stuff in a buffer and only show it if there's an error.
  3. On errors, ALWAYS give the library version, as old versions / npm issues are some of the most common problems.
  4. Think sensibly about the different debug levels and how to control them.
  5. "notice" lib
    1. common code to show certain notices once per load
    2. 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.

@gadicc gadicc added the enhancement New feature or request label Jun 19, 2024
gadicc pushed a commit that referenced this issue Sep 16, 2024
# [2.12.0](v2.11.3...v2.12.0) (2024-09-16)

### Bug Fixes

* **chart:** fix and improve non-Date handling code for periods ([f1106c2](f1106c2))
* **circleci,readme:** use node:18.0.0 for tests, make clear in readme ([8365a90](8365a90))
* **historical:** map requests to chart() with deprec notice ([#795](#795)) ([c212df9](c212df9))
* **imports:** add import assertions required in node since 17.5.0. ([7d0deea](7d0deea))
* **imports:** specify ".js" on local imports for full ESM compat ([46ee6c1](46ee6c1))
* **index:** remove erroneously removed moduleExec import ([fe1a493](fe1a493))
* **notices:** historical() note, type improvement, onceOnly text ([c131e5c](c131e5c))
* **pkg/scripts:** still need `prepublishOnly` to run `build` ([4da1273](4da1273))
* **pkg:** add babel importAttributes plugin ([e41f65d](e41f65d))
* **pkg:** drop ts-jest, use [@swc-jest](https://github.com/swc-jest), { keepImportAssertions: false } ([a0e2847](a0e2847))
* **pkg:** use swc, remove babel (faster, fixes import assertions) ([110d28d](110d28d))
* **tests-modules:** use swc here too ([c7e849c](c7e849c))

### Features

* **notices:** notices lib, refactor, use for "yahooSurvey" ([#783](#783)) ([b4c016b](b4c016b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant