@@ -1687,7 +1687,7 @@ console.log(data);
1687
1687
1688
1688
Additional documentation is available in the [ report documentation] [ ] .
1689
1689
1690
- ### process.report.setDiagnosticReportOptions ([ options] );
1690
+ ### process.report.setOptions ([ options] );
1691
1691
<!-- YAML
1692
1692
added: v11.8.0
1693
1693
-->
@@ -1712,23 +1712,18 @@ are shown below.
1712
1712
1713
1713
``` js
1714
1714
// Trigger a report on uncaught exceptions or fatal errors.
1715
- process .report .setDiagnosticReportOptions ({
1716
- events: [' exception' , ' fatalerror' ]
1717
- });
1715
+ process .report .setOptions ({ events: [' exception' , ' fatalerror' ] });
1718
1716
1719
1717
// Change the default path and filename of the report.
1720
- process .report .setDiagnosticReportOptions ({
1721
- filename: ' foo.json' ,
1722
- path: ' /home'
1723
- });
1718
+ process .report .setOptions ({ filename: ' foo.json' , path: ' /home' });
1724
1719
1725
1720
// Produce the report onto stdout, when generated. Special meaning is attached
1726
1721
// to `stdout` and `stderr`. Usage of these will result in report being written
1727
1722
// to the associated standard streams. URLs are not supported.
1728
- process .report .setDiagnosticReportOptions ({ filename: ' stdout' });
1723
+ process .report .setOptions ({ filename: ' stdout' });
1729
1724
1730
1725
// Enable verbose option on report generation.
1731
- process .report .setDiagnosticReportOptions ({ verbose: true });
1726
+ process .report .setOptions ({ verbose: true });
1732
1727
```
1733
1728
1734
1729
Signal based report generation is not supported on Windows.
@@ -1742,8 +1737,8 @@ added: v11.8.0
1742
1737
1743
1738
* ` filename ` {string} Name of the file where the report is written. This
1744
1739
should be a relative path, that will be appended to the directory specified in
1745
- ` process.report.setDiagnosticReportOptions ` , or the current working directory
1746
- of the Node.js process, if unspecified.
1740
+ ` process.report.setOptions ` , or the current working directory of the Node.js
1741
+ process, if unspecified.
1747
1742
* ` err ` {Error} A custom error used for reporting the JavsScript stack.
1748
1743
1749
1744
* Returns: {string} Returns the filename of the generated report.
0 commit comments