Closed PiotrOwsiak closed 9 months ago
please dont discard the issue template
otherwise i have confirmed that .enabled
with a *
in it will always return true
, i didnt know that the conventions also applied there (i had thought there it would mean "any module with that prefix to be enabled").
this will be fixed in the next version
I had a quick look at the debug package docs and I believe you are using it slightly wrong, instead of
no, debug.enable('MongoMS');
will enable the module name exactly MongoMS
not things like MongoMS:ResolveConfig
If you have more than one debuggers you should prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
The
*
character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three withDEBUG=connect:bodyParser,connect:compress,connect:session
, you may simply doDEBUG=connect:*
, or to run everything using this module simply useDEBUG=*
.
:tada: This issue has been resolved in version 9.1.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Sorry, I got scared by the big template, was in a hurry and thought it's a pretty simple bug report with an explanation already so it won't hurt if I discard the template to save some time.
Wow, you're right, I made a quick assumption that seemed logical to me, thanks for pointing that out :) I think the way * works is confusing and not intuitive, there is no symmetry there.
Anyway, kudos for super fast reaction and fix and thank you for the wonderful package, it's amazing IMHO and super useful.
I'm using version 9.1.1 and enabling debugging log does not work through package.json. Enabling EXP_NET0LISTEN feature does work through package.json and enabling debugging through an environment variable does work. I did a quick check and it seems the problem is here:
in the condition the part
debug.enabled('MongoMS:*')
seems to be true, I have not investigated further but if I remove that part of the condition then enabling debugging log through package.json starts to work.I had a quick look at the debug package docs and I believe you are using it slightly wrong, instead of
you should do:
and also check if it's enabled this way:
cause
seems to always return true according to https://www.npmjs.com/package/debug#conventions: " If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. "