Skip to content

Commit

Permalink
doc: update documentation for node:process warning
Browse files Browse the repository at this point in the history
PR-URL: #49517
Refs: #46862
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
  • Loading branch information
shubham9411 authored and ruyadorno committed Sep 28, 2023
1 parent 8e033c3 commit e3594d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,10 @@ process.on('warning', (warning) => {

By default, Node.js will print process warnings to `stderr`. The `--no-warnings`
command-line option can be used to suppress the default console output but the
`'warning'` event will still be emitted by the `process` object.
`'warning'` event will still be emitted by the `process` object. Currently, it
is not possible to suppress specific warning types other than deprecation
warnings. To suppress deprecation warnings, check out the [`--no-deprecation`][]
flag.

The following example illustrates the warning that is printed to `stderr` when
too many listeners have been added to an event:
Expand Down Expand Up @@ -3954,6 +3957,7 @@ cases:
[`'message'`]: child_process.md#event-message
[`'uncaughtException'`]: #event-uncaughtexception
[`--experimental-permission`]: cli.md#--experimental-permission
[`--no-deprecation`]: cli.md#--no-deprecation
[`--unhandled-rejections`]: cli.md#--unhandled-rejectionsmode
[`Buffer`]: buffer.md
[`ChildProcess.disconnect()`]: child_process.md#subprocessdisconnect
Expand Down

0 comments on commit e3594d5

Please sign in to comment.