Skip to content

Commit 4308d95

Browse files
legendecasjuanarbol
authored andcommitted
doc,report: document special filenames
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>
1 parent 8195c81 commit 4308d95

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
@@ -954,6 +954,9 @@ changes:
954954

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

957+
If the filename is set to `'stdout'` or `'stderr'`, the report is written to
958+
the stdout or stderr of the process respectively.
959+
957960
### `--report-on-fatalerror`
958961

959962
<!-- YAML

doc/api/process.md

+6
Original file line numberDiff line numberDiff line change
@@ -2813,6 +2813,9 @@ Filename where the report is written. If set to the empty string, the output
28132813
filename will be comprised of a timestamp, PID, and sequence number. The default
28142814
value is the empty string.
28152815
2816+
If the value of `process.report.filename` is set to `'stdout'` or `'stderr'`,
2817+
the report is written to the stdout or stderr of the process respectively.
2818+
28162819
```mjs
28172820
import { report } from 'node:process';
28182821

@@ -3007,6 +3010,9 @@ Writes a diagnostic report to a file. If `filename` is not provided, the default
30073010
filename includes the date, time, PID, and a sequence number. The report's
30083011
JavaScript stack trace is taken from `err`, if present.
30093012
3013+
If the value of `filename` is set to `'stdout'` or `'stderr'`, the report is
3014+
written to the stdout or stderr of the process respectively.
3015+
30103016
```mjs
30113017
import { report } from 'node:process';
30123018

0 commit comments

Comments
 (0)