From 6662752b6267b8ea40952f001a497075c98e3e4e Mon Sep 17 00:00:00 2001 From: Gireesh Punathil Date: Sat, 2 Nov 2024 18:07:09 +0530 Subject: [PATCH] doc: add a note on console stream behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Luigi Pinca --- doc/api/console.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/api/console.md b/doc/api/console.md index 147a45eadb1203..1c966d094d1472 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -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`: