-
-
Notifications
You must be signed in to change notification settings - Fork 736
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 logging broken in beta (14.0.0-beta.5) #2745
Labels
Comments
Embarassingly, the issue was I was using "NODE_DEBUG=nock." instead of "NODE_DEBUG=nock:". Make sure to use a colon, not a period. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please avoid duplicates
Reproducible test case
node ./node_modules/mocha/bin/mocha test.js
Nock Version
14.0.0-beta.5
Node Version
18.20.2
TypeScript Version
No response
What happened?
I am unable to see nock debug logs, and I've tried everything recommended by the docs. I've used every env var combination of {DEBUG, NODE_DEBUG} and values {nock, nock.*}.
I use debug-logging of my own on this machine plenty and it works fine, but it stopped working recently for nock. Perhaps caused by your removal of
debug
in favor of node's built-in debuglog?In theory I could switch back to non-beta nock, but the beta's are the only ones that work with fetch() (including streams and buffers and other little details) for me.
Here's my test.js file:
Here's the result in the terminal:
In case you need it, here's the package.json:
Would you be interested in contributing a fix?
The text was updated successfully, but these errors were encountered: