diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 8a9835626b4095..8080e628617bde 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -273,7 +273,8 @@ async_hooks.createHook({ init(asyncId, type, triggerAsyncId) { const eid = async_hooks.executionAsyncId(); fs.writeSync( - 1, `${type}(${asyncId}): trigger: ${triggerAsyncId} execution: ${eid}\n`); + process.stdout.fd, + `${type}(${asyncId}): trigger: ${triggerAsyncId} execution: ${eid}\n`); } }).enable(); @@ -330,7 +331,7 @@ async_hooks.createHook({ const eid = async_hooks.executionAsyncId(); const indentStr = ' '.repeat(indent); fs.writeSync( - 1, + process.stdout.fd, `${indentStr}${type}(${asyncId}):` + ` trigger: ${triggerAsyncId} execution: ${eid}\n`); },