Open In App

Node.js process.report.compact 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 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: This property returns a boolean value.

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

Example:

index.js




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


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_compact


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads