ProcessReport
[<Interface>]
type ProcessReport =
abstract member compact: bool with get, set
abstract member directory: string with get, set
abstract member excludeEnv: bool with get, set
abstract member filename: string with get, set
abstract member reportOnFatalError: bool with get, set
abstract member reportOnSignal: bool with get, set
abstract member reportOnUncaughtException: bool with get, set
abstract member signal: Signals with get, set
abstract member getReport (?err: exn) : obj
abstract member writeReport (?err: exn) : string
abstract member writeReport (?fileName: string, ?err: exn) : string| Assembly | Xantham.Fable.Node |
Properties
abstract member compact: bool with get, set
abstract member compact: bool with get, setWrite reports in a compact format, single-line JSON, more easily consumable by log processing systems than the default multi-line format designed for human consumption.
@since v13.12.0, v12.17.0
abstract member directory: string with get, set
abstract member directory: string with get, setDirectory where the report is written. The default value is the empty string, indicating that reports are written to the current working directory of the Node.js process.
abstract member excludeEnv: bool with get, set
abstract member excludeEnv: bool with get, setIf true, a diagnostic report is generated without the environment variables.
abstract member filename: string with get, set
abstract member filename: string with get, setFilename 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.
abstract member reportOnFatalError: bool with get, set
abstract member reportOnFatalError: bool with get, setIf true, a diagnostic report is generated on fatal errors, such as out of memory errors or failed C++ assertions.
abstract member reportOnSignal: bool with get, set
abstract member reportOnSignal: bool with get, setIf true, a diagnostic report is generated when the process receives the signal specified by process.report.signal.
abstract member reportOnUncaughtException: bool with get, set
abstract member reportOnUncaughtException: bool with get, setIf true, a diagnostic report is generated on uncaught exception.
abstract member signal: Signals with get, set
abstract member signal: Signals with get, setThe signal used to trigger the creation of a diagnostic report.
Methods
abstract member getReport (?err: exn) : obj
abstract member getReport (?err: exn) : objReturns a JavaScript Object representation of a diagnostic report for the running process. The report's JavaScript stack trace is taken from err, if present.
abstract member writeReport (?err: exn) : string
abstract member writeReport (?err: exn) : stringWrites 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.
If the value of filename is set to 'stdout' or 'stderr', the report is written to the stdout or stderr of the process respectively.
| Parameter | |
|---|---|
fileName | 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. |
err | A custom error used for reporting the JavaScript stack. |
Returns. Filename of the generated report.
abstract member writeReport (?fileName: string, ?err: exn) : string
abstract member writeReport (?fileName: string, ?err: exn) : stringWrites 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.
If the value of filename is set to 'stdout' or 'stderr', the report is written to the stdout or stderr of the process respectively.
| Parameter | |
|---|---|
fileName | 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. |
err | A custom error used for reporting the JavaScript stack. |
Returns. Filename of the generated report.