Skip to content

Commit

Permalink
doc: add a note on console stream behavior
Browse files Browse the repository at this point in the history
Many user reported issues show poor awareness of the
nature of console streams. explicitly document that.

PR-URL: #55616
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
gireeshpunathil authored and aduh95 committed Nov 5, 2024
1 parent 9743fa4 commit 6662752
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ The module exports two specific components:

_**Warning**_: The global console object's methods are neither consistently
synchronous like the browser APIs they resemble, nor are they consistently
asynchronous like all other Node.js streams. See the [note on process I/O][] for
asynchronous like all other Node.js streams. Programs that desire to depend
on the synchronous / asynchronous behavior of the console functions should
first figure out the nature of console's backing stream. This is because the
stream is dependent on the underlying platform and standard stream
configuration of the current process. See the [note on process I/O][] for
more information.

Example using the global `console`:
Expand Down

0 comments on commit 6662752

Please sign in to comment.