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

Can't enable namespace disabled by notThis #693

Closed
bato3 opened this issue Mar 7, 2019 · 1 comment
Closed

Can't enable namespace disabled by notThis #693

bato3 opened this issue Mar 7, 2019 · 1 comment

Comments

@bato3
Copy link

bato3 commented Mar 7, 2019

Usecase:

set DEBUG=knex:query && node file.js

const DebugModule = require('debug')

//temporary disable logging 
let x = DebugModule.disable()
DebugModule.enable(x+ ',-knex:query');  // almost OK: knex:query,-knex:query

//and try re-enable
x = DebugModule.disable()
DebugModule.enable(x+ ',knex:query') // Don't work: knex:query,knex:query,-knex:query

I think that namespaces with identic name should be filtered before adding. (eg knex:*,-knex:*, not knex:query,-knex:*)

This is needed for temporary blocking and unlock namespaces eg by REST API.

@Qix-
Copy link
Member

Qix- commented Mar 7, 2019

This is a known issue and is listed to be fixed via #425.

Going to close as a duplicate.

@Qix- Qix- closed this as completed Mar 7, 2019
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

2 participants