multiple instances on the same namespace get different colors
See original GitHub issueIf I create multiple instances with the same namespace, they will each acquire a different color. This is very counter-intuitive to me; if I am creating multiple loggers on the same namespace then by definition I want them to be treated as a single unit. If I wanted them to be separate, I would if nothing else use different namespaces with a common prefix.
Example:
var debug = require('debug');
debug.enable('foo');
// shouldn't these use the same color?
var logger1 = debug('foo');
var logger2 = debug('foo');
I’m currently working around this in my app by wrapping debug
with some code that caches the result by namespace, but it really seems like this functionality should be internal to debug
.
I’m happy to submit a PR for this, if I get feedback that others agree this should be changed.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
multiple instances on the same namespace get different colors
If I create multiple instances with the same namespace, they will each acquire a different color. This is very counter-intuitive to me; ...
Read more >c# - ambiguous class with namespace names in 2 dlls
Now I want to create an instance of one of them, but because the namespace and class names are same, the compiler goes...
Read more >using directive - C# Reference - Microsoft Learn
A using directive doesn't give you access to any namespaces that are nested in the namespace you specify. Namespaces come in two categories: ......
Read more >Modules and Namespaces in Jason1
This document describes how modules are used in Jason. Modules in Jason allow the programmer to develop agent programs into separate, independent, ...
Read more >Use namespace rules in policy - Calico - Tigera
Use namespaces and namespace selectors in Calico network policy to group or ... A namespaceSelector matches one or more namespaces based on the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This should be fixed.
+1 on this feature.