ecr-viewer
    Preparing search index...

    Interface ProcessReport

    interface ProcessReport {
        compact: boolean;
        directory: string;
        filename: string;
        reportOnFatalError: boolean;
        reportOnSignal: boolean;
        reportOnUncaughtException: boolean;
        signal: Signals;
        getReport(err?: Error): object;
        writeReport(fileName?: string, err?: Error): string;
        writeReport(err?: Error): string;
    }
    Index

    Properties

    compact: boolean

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

    v13.12.0, v12.17.0

    directory: string

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

    filename: string

    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.

    reportOnFatalError: boolean

    If true, a diagnostic report is generated on fatal errors, such as out of memory errors or failed C++ assertions.

    false
    
    reportOnSignal: boolean

    If true, a diagnostic report is generated when the process receives the signal specified by process.report.signal.

    false
    
    reportOnUncaughtException: boolean

    If true, a diagnostic report is generated on uncaught exception.

    false
    
    signal: Signals

    The signal used to trigger the creation of a diagnostic report.

    'SIGUSR2'
    

    Methods

    • Returns a JavaScript Object representation of a diagnostic report for the running process. The report's JavaScript stack trace is taken from err, if present.

      Parameters

      • Optionalerr: Error

      Returns object

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

      If the value of filename is set to 'stdout' or 'stderr', the report is written to the stdout or stderr of the process respectively.

      Parameters

      • OptionalfileName: 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.

      • Optionalerr: Error

        A custom error used for reporting the JavaScript stack.

      Returns string

      Filename of the generated report.

    • Parameters

      • Optionalerr: Error

      Returns string