diff options
Diffstat (limited to 'lib/internal/worker/io.js')
-rw-r--r-- | lib/internal/worker/io.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/internal/worker/io.js b/lib/internal/worker/io.js index e88991aaab..387dc9df74 100644 --- a/lib/internal/worker/io.js +++ b/lib/internal/worker/io.js @@ -15,7 +15,14 @@ const { threadId } = internalBinding('worker'); const { Readable, Writable } = require('stream'); const EventEmitter = require('events'); const util = require('util'); -const debug = util.debuglog('worker'); + +let debuglog; +function debug(...args) { + if (!debuglog) { + debuglog = require('internal/util/debuglog').debuglog('worker'); + } + debuglog(...args); +} const kIncrementsPortRef = Symbol('kIncrementsPortRef'); const kName = Symbol('kName'); |