We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0783663 commit 1f4f811Copy full SHA for 1f4f811
lib/internal/http2/core.js
@@ -190,10 +190,10 @@ let debug = require('internal/util/debuglog').debuglog('http2', (fn) => {
190
debug = fn;
191
});
192
193
-// TODO(addaleax): See if this can be made more efficient by figuring out
194
-// whether debugging is enabled before we perform any further steps. Currently,
195
-// this seems pretty fast, though.
196
function debugStream(id, sessionType, message, ...args) {
+ if (!debug.enabled) {
+ return;
+ }
197
debug('Http2Stream %s [Http2Session %s]: ' + message,
198
id, sessionName(sessionType), ...new SafeArrayIterator(args));
199
}
0 commit comments