Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5d8e99a

Browse files
committedAug 17, 2022
doc,report: document special filenames
Filenames `stdout` and `stderr` have special meanings when writing the report.
1 parent ec44403 commit 5d8e99a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
 

‎doc/api/cli.md

+3
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,9 @@ changes:
10641064

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

1067+
If the filename is set to `stdout` or `stderr`, the report is written to the
1068+
stdout or stderr of the process respectively.
1069+
10671070
### `--report-on-fatalerror`
10681071

10691072
<!-- YAML

‎doc/api/process.md

+6
Original file line numberDiff line numberDiff line change
@@ -2825,6 +2825,9 @@ Filename where the report is written. If set to the empty string, the output
28252825
filename will be comprised of a timestamp, PID, and sequence number. The default
28262826
value is the empty string.
28272827
2828+
If the value of `process.report.filename` is set to `stdout` or `stderr`, the
2829+
report is written to the stdout or stderr of the process respectively.
2830+
28282831
```mjs
28292832
import { report } from 'node:process';
28302833

@@ -3020,6 +3023,9 @@ Writes a diagnostic report to a file. If `filename` is not provided, the default
30203023
filename includes the date, time, PID, and a sequence number. The report's
30213024
JavaScript stack trace is taken from `err`, if present.
30223025
3026+
If the value of `filename` is set to `stdout` or `stderr`, the report is
3027+
written to the stdout or stderr of the process respectively.
3028+
30233029
```mjs
30243030
import { report } from 'node:process';
30253031

0 commit comments

Comments
 (0)
Please sign in to comment.