ProcessReport.writeReport - Node documentation
method ProcessReport.writeReport

Usage in Deno

import { type ProcessReport } from "node:process";
ProcessReport.writeReport(fileName?: string): string

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.

Parameters

optional
fileName: string

Name of the file where the report is written. This should be a relative path, that will be appended to the directory specified in process.report.directory, or the current working directory of the Node.js process, if unspecified.

Return Type

string

Filename of the generated report.

ProcessReport.writeReport(error?: Error): string

Parameters

optional
error: Error

Return Type

string
ProcessReport.writeReport(
fileName?: string,
err?: Error,
): string

Parameters

optional
fileName: string
optional
err: Error

Return Type

string