Node.js process.report.compact Property
Last Updated :
08 Mar, 2021
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
const process = require( 'process' );
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
Please Login to comment...