Open In App

Node.js process.report.signal Property

Last Updated : 08 Mar, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

The process.report is an object whose methods are used to generate diagnostic reports for the current process. The signal used to trigger the creation of a diagnostic report. Defaults to ‘SIGUSR2’.

Syntax:

process.report.signal

Return Value: This property returns the generated diagnostic reports for the current process.

Below examples illustrate the use of the process.report.signal property in Node.js:

Example:

index.js




// Node.js program to demonstrate the 
// process.report.signal Property 
     
// Include process module 
const process = require('process'); 
    
// Printing process.report.signal property value 
console.log(`Report signal: ${process.report.signal}`);


Command to run:

node index.js

Output:

Note: The above program will compile and run by using the node filename.js command.

Reference:https://nodejs.org/api/process.html#process_process_report_signal


Similar Reads

Node.js process.report.reportOnSignal Property
The process.report is an object whose methods are used to generate diagnostic reports for the current process. If process.report.reportOnSignal is true, a diagnostic report is generated when the process receives the signal specified by process.report.signal. Syntax: process.report.compact Return Value: This property returns a boolean value. Below e
1 min read
Node.js process.report.compact Property
The process.report is an object whose methods are used to generate diagnostic reports for the current process. The process.report.compact 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. Syntax: process.report.compact Return Value
1 min read
Node.js process.report.reportOnFatalError Property
The process object is a global that provides information about, and control over, the current Node.js process. As a global, it is always available to Node.js applications without using require(). It can also be explicitly accessed using require() as shown below: const process = require('process');If process.report.reportOnFatalError is true, a diag
1 min read
Node.js process.report.reportOnUncaughtException Property
The process object is a global that provides information about, and control over, the current Node.js process. As a global, it is always available to Node.js applications without using require(). It can also be explicitly accessed using require() as shown below: const process = require('process');If process.report.reportOnUncaughtException is true,
1 min read
Node.js process.report.directory Property
The process.report.directory is an inbuilt application programming interface of class Process within process module which is used to get or set the directory where the report is written. Syntax: const process.report.directoryParameters: This api takes no argument as a parameter. Return Value: This api returns the directory where the report is writt
1 min read
Node.js process.report.filename Property
The process.report.filename is an inbuilt application programming interface of class Process within process module which is used to get or set the file name where the report is written. Syntax: const process.report.filename Parameters: This api takes no argument as a parameter. Return Value: This api returns the file name where the report is writte
1 min read
Node.js process.report Property
The process.report is an inbuilt application programming interface of class Process within the process module which is used to provide the methods with which diagnostic reports for the current process are generated. Syntax: const process.report Return Value: This property returns the methods with which diagnostic reports for the current process is
1 min read
Node.js process.report Object
The process.report is an object found under the Process Module of Node.js. process.report have many methods such as 'writeReport', 'getReport', 'directory', 'filename', 'compact', 'signal', 'reportOnFatalError', 'reportOnSignal', and 'reportOnUncaughtException'. These methods are used to generate diagnostic reports for the current process. Syntax:
3 min read
Node.js process.report.writeReport() Method
The process.report.writeReport() method 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. Syntax: process.report.writeReport([filename][, err]) Parameters: This method accepts two parameters a
1 min read
Node.js process.report.getReport([err]) Function
The process.report.gerReport() is a method of process.report javascript object that helps generate a report of the currently running node.js process. Syntax: process.report.getReport([err]) Parameters: It takes an array of Error Object that represents a custom error in the javascript stack Return Value: It returns a javascript object that represent
1 min read