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

[Feature Request] Listing of registered keys, toggle #220

Closed
nyteshade opened this issue Sep 6, 2015 · 3 comments
Closed

[Feature Request] Listing of registered keys, toggle #220

nyteshade opened this issue Sep 6, 2015 · 3 comments

Comments

@nyteshade
Copy link

One thing that would be nice in our production environments is to be able to toggle on debug values during runtime without

  • Knowing which keys the developer used in the code
  • Restarting the server in question

It seems like this could be circumvented by exposing, via a method, the list of debug keys supplied in the form of require ('debug')(debugKey). Then, of course, a call to enable, if it does what it sounds like it does should start the logs flowing. The biggest issues being without looking through the code its hard to know what to even enable on the command line, the hard way.

It could also be enhanced to allow supplying a description such as

require('debug')(
  'ui:login',
  'Calls with this signature log the workings of the login process'
)
require('debug')(
  'ui:login:trace',
  'Calls with this signature log normally too verbose workings of the login process'
)

This way when doing something like require('debug').list() we might get a response such as:

[
  {key:'ui:login', desc:'Calls with this signature log the workings of the login process'},
  ...
]

If nobody else has provided a working, backwards compatible, solution to dynamic enabling and disabling of these log calls, I'll take a look myself.

@matthewmueller
Copy link
Contributor

This project would solve both your problems: https://github.com/bdentino/redebug

But yah +1. It's sorta hacky, and it would be great to see this in core.

@nouex
Copy link

nouex commented Oct 18, 2015

+1

@thebigredgeek
Copy link
Contributor

#370 < Please feel free to post the idea here

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

No branches or pull requests

4 participants