process.report.filename


版本历史
版本变更
v13.12.0, v12.17.0

此 API 不再是实验的。

v11.12.0

新增于: v11.12.0

写入报告的文件名。如果设置为空字符串,则输出文件名将由时间戳、PID 和序列号组成。默认值为空字符串。

\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.

如果 process.report.filename 的值设置为 'stdout''stderr',则报告分别写入进程的 stdout 或 stderr。

\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.

import { report } from 'node:process';
console.log(`Report filename is ${report.filename}`);const { report } = require('node:process');
console.log(`Report filename is ${report.filename}`);

AltStyle によって変換されたページ (->オリジナル) /