I set NODE_DEBUG
environment variable to request
:
export NODE_DEBUG=request
Now I want to unset it.
export NODE_DEBUG=""
I tried the command above, but the Node processes still output request debug messages.
Did I do something wrong? How can I prevent messages like below?
REQUEST: { host: 'api......com',
port: ...,
path: '/...',
method: 'get',
headers:
{...}
STATUS: 200
HEADERS: {...}
My case was that I was using another library that was having debug: true
flag. Probably, it was setting NODE_DEBUG="request"
on runtime.
var apiClient = new Foo({
debug: true
});
By removing debug: true
or setting it to false
, the issue was solved.
try unset NODE_DEBUG
This will do just what it sounds like: "unset" this environment variable.
(credit goes to @vinayr's comment for this answer, but I'm putting it here for easier discovery)