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 <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>
  • Loading branch information
legendecas authored and juanarbol committed Oct 11, 2022
1 parent 8195c81 commit 4308d95
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 @@ -954,6 +954,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 @@ -2813,6 +2813,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 @@ -3007,6 +3010,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 4308d95

Please sign in to comment.