Skip to content

Commit e8441a2

Browse files
legendecasruyadorno
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 d2dce59 commit e8441a2

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
@@ -981,6 +981,9 @@ changes:
981981

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

984+
If the filename is set to `'stdout'` or `'stderr'`, the report is written to
985+
the stdout or stderr of the process respectively.
986+
984987
### `--report-on-fatalerror`
985988

986989
<!-- YAML

doc/api/process.md

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

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

0 commit comments

Comments
 (0)