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

Logging levels #59

Closed
adamziel opened this issue Oct 22, 2022 · 2 comments
Closed

Logging levels #59

adamziel opened this issue Oct 22, 2022 · 2 comments

Comments

@adamziel
Copy link
Collaborator

adamziel commented Oct 22, 2022

The amount of log messages is too large and reduces the usefulness of the logged information. Let's find a solution that supports:

  • Different logging level (at least debug, info, warn, error)
  • Custom module labels (like PHP, ServiceWorker, etc.)
  • Filtering the output by level and module
@eliot-akira
Copy link
Collaborator

eliot-akira commented Oct 22, 2022

There's an NPM library called debug that's popular.

debug - A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers

https://github.com/debug-js/debug

Maybe has too many features, like assigning unique color to each namespace.


Another NPM library is called log. It's more minimal, and has logging levels as you described.

log - Universal logging utility

https://github.com/medikoo/log

@adamziel
Copy link
Collaborator Author

adamziel commented Jun 2, 2023

This was a super annoying issue when I was initially working on the service worker, but I never had that problem ever since. The default console levels like warn() or debug() seem to be good enough. If this is ever a problem, let's reopen this issue.

@adamziel adamziel closed this as completed Jun 2, 2023
eruizdechavez pushed a commit to eruizdechavez/wordpress-playground that referenced this issue Sep 20, 2023
- Add compression to the Express server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants