You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
One thing that would be nice in our production environments is to be able to toggle on debug values during runtime without
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
This way when doing something like
require('debug').list()
we might get a response such as: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.
The text was updated successfully, but these errors were encountered: