From 218d7e9f2d54dfc63b2c3d650913cb965d67e7b7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 23 Mar 2010 20:56:44 -0700 Subject: [PATCH] Clean up NODE_DEBUG detection It wasn't detecting if NODE_DEBUG=0 --- src/node.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/node.js b/src/node.js index 84710b06e04..e0fad180d84 100644 --- a/src/node.js +++ b/src/node.js @@ -323,9 +323,7 @@ global.clearInterval = global.clearTimeout; // Modules -var debugLevel = 0; -if ("NODE_DEBUG" in process.env) debugLevel = 1; - +var debugLevel = parseInt(process.env["NODE_DEBUG"]); function debug (x) { if (debugLevel > 0) { process.binding('stdio').writeError(x + "\n");