doc,report: document special filenames

Filenames `stdout` and `stderr` have special meanings when writing
the report.

PR-URL: https://github.com/nodejs/node/pull/44257
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Chengzhong Wu 2022-08-19 12:42:29 +08:00 committed by GitHub
parent a2dcc08a9c
commit dab205748d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -1072,6 +1072,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

View File

@ -2825,6 +2825,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';
@ -3020,6 +3023,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';