mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
http2: fix debugStream method
So it actually logs something when debug is activated. PR-URL: https://github.com/nodejs/node/pull/45129 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
@@ -189,9 +189,10 @@ const { _connectionListener: httpConnectionListener } = http;
|
||||
let debug = require('internal/util/debuglog').debuglog('http2', (fn) => {
|
||||
debug = fn;
|
||||
});
|
||||
const debugEnabled = debug.enabled;
|
||||
|
||||
function debugStream(id, sessionType, message, ...args) {
|
||||
if (!debug.enabled) {
|
||||
if (!debugEnabled) {
|
||||
return;
|
||||
}
|
||||
debug('Http2Stream %s [Http2Session %s]: ' + message,
|
||||
|
||||
Reference in New Issue
Block a user