diff options
author | cjihrig <cjihrig@gmail.com> | 2019-02-07 21:20:32 +0300 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-02-10 01:09:51 +0300 |
commit | e154176b7cc397399ccb939b920b308f8d5cb874 (patch) | |
tree | 74231cec7d999cef78be8d0a72787cea96c38006 /doc/api/report.md | |
parent | 46c16b3caec239b7e9eca829f3da3490730ebc43 (diff) |
report: rename setDiagnosticReportOptions()
setDiagnosticReportOptions() is a method on process.report,
making the "DiagnosticReport" part redundant. Rename the
function to setOptions().
PR-URL: https://github.com/nodejs/node/pull/25990
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/api/report.md')
-rw-r--r-- | doc/api/report.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/api/report.md b/doc/api/report.md index 3937f88cc1b..89bb203691f 100644 --- a/doc/api/report.md +++ b/doc/api/report.md @@ -445,10 +445,10 @@ times for the same Node.js process. ## Configuration Additional runtime configuration that influences the report generation -constraints are available using `setDiagnosticReportOptions()` API. +constraints are available using `setOptions()` API. ```js -process.report.setDiagnosticReportOptions({ +process.report.setOptions({ events: ['exception', 'fatalerror', 'signal'], signal: 'SIGUSR2', filename: 'myreport.json', @@ -481,13 +481,13 @@ pertinent to the report generation. Defaults to `false`. ```js // Trigger report only on uncaught exceptions. -process.report.setDiagnosticReportOptions({ events: ['exception'] }); +process.report.setOptions({ events: ['exception'] }); // Trigger report for both internal errors as well as external signal. -process.report.setDiagnosticReportOptions({ events: ['fatalerror', 'signal'] }); +process.report.setOptions({ events: ['fatalerror', 'signal'] }); // Change the default signal to `SIGQUIT` and enable it. -process.report.setDiagnosticReportOptions( +process.report.setOptions( { events: ['signal'], signal: 'SIGQUIT' }); ``` |