Skip to content

Commit

Permalink
doc,report: document special filenames
Browse files Browse the repository at this point in the history
Filenames `stdout` and `stderr` have special meanings when writing
the report.

PR-URL: #44257
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Erick Wendel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
  • Loading branch information
legendecas authored and ruyadorno committed Aug 22, 2022
1 parent d2dce59 commit e8441a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,9 @@ changes:

Name of the file to which the report will be written.

If the filename is set to `'stdout'` or `'stderr'`, the report is written to
the stdout or stderr of the process respectively.

### `--report-on-fatalerror`

<!-- YAML
Expand Down
6 changes: 6 additions & 0 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2824,6 +2824,9 @@ Filename where the report is written. If set to the empty string, the output
filename will be comprised of a timestamp, PID, and sequence number. The default
value is the empty string.
If the value of `process.report.filename` is set to `'stdout'` or `'stderr'`,
the report is written to the stdout or stderr of the process respectively.
```mjs
import { report } from 'node:process';

Expand Down Expand Up @@ -3019,6 +3022,9 @@ Writes a diagnostic report to a file. If `filename` is not provided, the default
filename includes the date, time, PID, and a sequence number. The report's
JavaScript stack trace is taken from `err`, if present.
If the value of `filename` is set to `'stdout'` or `'stderr'`, the report is
written to the stdout or stderr of the process respectively.
```mjs
import { report } from 'node:process';

Expand Down

0 comments on commit e8441a2

Please sign in to comment.