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

Add trace method #87

Open
caiogondim opened this issue Apr 27, 2017 · 2 comments
Open

Add trace method #87

caiogondim opened this issue Apr 27, 2017 · 2 comments
Labels

Comments

@caiogondim
Copy link
Owner

Reference: https://github.com/pimterry/loglevel

@stale
Copy link

stale bot commented Oct 10, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 10, 2017
@pdfowler
Copy link

pdfowler commented Apr 19, 2018

edit Comment withdrawn. I just updated to 3.x from 2.x, and after some reading, I see that this is not possible as log.trace is now a mirror of console.trace.

I love this library for our logging, but the lack of a trace method is something I really miss from libraries I've used in the past.

Expected Behavior

  1. trace is an additional level, more verbose than debug
  2. trace is disabled unless explicitly enabled

Use Case

When building big complicated features, it's really great to have an additional level of logging below debug. In the early stages of development, I'll add log.debug statements at key points in the code. As the flow of data becomes more clear, I start removing some of the more verbose log levels (or simply start commenting them out). Feature gets released and I move on to the next thing.

A few months later, I need to revisit the logic to account for a new use case or to fix a bug. My comments are great, but my log statements allow me to see the data in motion, but I've lost most of the verbose ones for clarity. The same goes for another developer on my team who needs to learn the algorithm.

Having a trace level allows me to keep the verbosity available, without flooding my console by default.

I'll see if I have some time in the next few weekends to take a look ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants