mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
doc: add a note on console stream behavior
Many user reported issues show poor awareness of the nature of console streams. explicitly document that. PR-URL: https://github.com/nodejs/node/pull/55616 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
ba8fc73131
commit
44afd67831
@ -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`:
|
||||
|
Loading…
Reference in New Issue
Block a user