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

Namespace conflicts #451

Closed
yarmyarch opened this issue May 1, 2017 · 7 comments
Closed

Namespace conflicts #451

yarmyarch opened this issue May 1, 2017 · 7 comments
Labels
bug This issue identifies a malfunction change-minor This proposes or provides a change that requires a minor release discussion This issue is requesting comments and discussion

Comments

@yarmyarch
Copy link

yarmyarch commented May 1, 2017

Namespaces would conflict and only the latest namespace would be activated at the same time.

Test case:

let debug = require('debug');

debug.enable('test1*');
debug.enable('test2*');

let log_1 = debug('test1');
let log_2 = debug('test2');

console.log(1, log_1.enabled);
console.log(2, log_2.enabled);

Results:

1 false
2 true

Expected:

1 true
2 true
@TooTallNate
Copy link
Contributor

@thebigredgeek This is probably another example of how we need to fix enable() / disable() for v3.

@thebigredgeek
Copy link
Contributor

@TooTallNate yeah it might also make sense to merge namespaces by default, or throw an error (optional "strict" mode or something) if namespace collision occurs.

@therealgilles
Copy link

When do you think this will be released? I rely heavily on debug.enable('namespace:*') to enable debugging on a per-file basis.

@Qix-
Copy link
Member

Qix- commented Jun 20, 2018

@therealgilles We all have day jobs - as with the majority of open source, this will get fixed when it gets fixed.

@Qix- Qix- added discussion This issue is requesting comments and discussion bug This issue identifies a malfunction change-minor This proposes or provides a change that requires a minor release labels Jun 20, 2018
@therealgilles
Copy link

therealgilles commented Jun 20, 2018

@Qix- : My comment is from 7 months ago and was not meant to sound pushy. I totally understand, no worries. I have held off on upgrading thus far and the library still does the job for me. I also appreciate all the work people like you put in outside of their day jobs.

@qix
Copy link

qix commented Jun 20, 2018

@Qix-

@Qix-
Copy link
Member

Qix- commented Dec 18, 2018

See #425. I'm moving the discussion around .enable()/.disable() there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue identifies a malfunction change-minor This proposes or provides a change that requires a minor release discussion This issue is requesting comments and discussion
Development

No branches or pull requests

6 participants