-
Notifications
You must be signed in to change notification settings - Fork 5
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
Find a multilevel logger framework #6
Comments
Note: NSS currently uses the |
Yeah, but that doesn't appear to have multiple levels, which I feel makes it unusable for this kind of project. Or does it? |
It does not, and it's a good counterargument. |
Check out nodeSolidServer/node-solid-server#920 - I suggested loglevel and winston there. loglevel is quite easy to use, whereas winston is quite sophisticated. As starter I'd move the logging logic into a dedicated file, so you can exchange the logic there if needed (even if that module is just a proxy to console.log in the beginning). |
@Ryuno-Ki do you know if loglevel is async? I'd like to keep quite a lot of logging statements in, as I have found that it helps in projects like ours when people report problems, we can ask them to turn their log level up and try again. But then, it becomes really important that logging isn't occupying more than necessary of resources. |
@kjetilk From reading the source code I'd say it is synchronous: https://github.com/pimterry/loglevel/blob/master/lib/loglevel.js |
This module uses mostly
console.log
and is pretty chatty. We need to use a logger framework with at leastinfo
,debug
andtrace
levels.We should pick something that could be brought to v.next too, and so it should have more levels than that, be maintained and in common use, integrate well with test runs (so that different levels can be chosen directly on the command line), and be easy for people to set loglevels if they need help debugging stuff.
The text was updated successfully, but these errors were encountered: