VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-process-report-getreporterr-function/

⇱ Node.js process.report.getReport([err]) Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js process.report.getReport([err]) Function

Last Updated : 28 Apr, 2025

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 represents a report for the running process.

Example 1: In this example, we will simply log the currently running process's report to the console.

Filename: index.js

Command to run:

node index.js

Output:

👁 Image
 

Example 2: In this example, we will print the command line of the running process's header to the console.

Filename: index.js

Command to run:

node index.js

Output:

👁 Image
 

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

Comment

Explore