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
DEBUG_DEPTH not working #746
Comments
Noticed this also. Looks like it is defaulting to 3 and not allowing an override... Any fix in the works? |
Yep looks like a regression somewhere. |
Can you test with |
Started down the |
Looks like fix is effective. Any place to add unit tests for this? I should have noted it reproduces only when deep object is the second argument to the // index.js
require('debug')('FOO')('something', {
x: 1,
y: { a: 2, b: 3, c: { a: 1, b: { a: 1, b: { a: 1, b: { a: 1 } } } } },
}); Before fix: $ DEBUG=FOO DEBUG_DEPTH=40 node index.js
FOO something { x: 1, y: { a: 2, b: 3, c: { a: 1, b: [Object] } } } +0ms After fix: $ DEBUG=FOO DEBUG_DEPTH=40 node index.js
FOO something {
x: 1,
y: {
a: 2,
b: 3,
c: {
a: 1,
b: { a: 1, b: { a: 1, b: { a: 1 } } }
}
}
} +0ms |
Yeah that's much less simple to fix; there are a few bugs surrounding this. v5 is going to be a rewrite for the most part, so a lot of this will get addressed then. Glad to know it works now (mostly); I'll commit it in sometime soon. Thank you very much for testing @anishkny :) |
What is the status on this issue ? I noticed it recently in our production container, but that's a bit more tricky since I can't reproduce the problem locally. Same value of |
@Qix- very useful & constructive, thanks. Since you clearly need me to clarify my question: Giving this issue is opened for more than a year, and no news since Jul 9, 2020, would you be so kind to provide some update on its resolution ? Thanks |
There is no update. |
@Qix- Thanks. Thing is, you apparently already had a fix a year ago and stated in the last update on this issue :
I'm wondering what's holding you back for so long and if the project is still maintained. |
Yep.
Life.
Yep.
I'm the only active maintainer and I've been struggling to find free time to work on unrelated OSS. The pandemic hit us really hard and we're recovering still. |
Sorry to hear that, hold on there.
That's understandable. That's not a critical issue anyway, just an annoying one. |
It looks like your fix unfixed itself in the mean time somewhere. Running the test someone mentions above yields this:
As you can see, this stil (again?) prints |
My fix wasn't merged. You can try to checkout this branch to see if it works: https://github.com/calvintwr/debug/tree/fix/debug-depth
A new PR is at #926 |
Looks like it works as expected now:
|
DEBUG_DEPTH
env var has no effect. I tried values of10
,100
,null
. No matter what I always get the following display:My invocation:
The text was updated successfully, but these errors were encountered: