Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8a40468

Browse filesBrowse files
cjihrigrvagg
authored andcommitted
report: remove verbose setting
This commit removes the --diagnostic-report-verbose CLI option and all associated logic. The flag is currently only used in one place, and only reflects the settings at startup. Additionally, Node tends to use the NODE_DEBUG mechanism for adding verbose output. PR-URL: #26195 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 0e89d7a commit 8a40468
Copy full SHA for 8a40468

File tree

Expand file treeCollapse file tree

9 files changed

+3
-124
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

9 files changed

+3
-124
lines changed
Open diff view settings
Collapse file

‎doc/api/cli.md‎

Copy file name to clipboardExpand all lines: doc/api/cli.md
-8Lines changed: 0 additions & 8 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,6 @@ Enables report to be generated on un-caught exceptions, if
126126
`--experimental-report` is enabled. Useful when inspecting JavaScript stack in
127127
conjunction with native stack and other runtime environment data.
128128

129-
### `--diagnostic-report-verbose`
130-
<!-- YAML
131-
added: v11.8.0
132-
-->
133-
134-
Flag that enables additional information to be printed during report generation.
135-
136129
### `--enable-fips`
137130
<!-- YAML
138131
added: v6.0.0
@@ -672,7 +665,6 @@ Node.js options that are allowed are:
672665
- `--diagnostic-report-on-signal`
673666
- `--diagnostic-report-signal`
674667
- `--diagnostic-report-uncaught-exception`
675-
- `--diagnostic-report-verbose`
676668
- `--enable-fips`
677669
- `--experimental-modules`
678670
- `--experimental-repl-await`
Collapse file

‎doc/api/process.md‎

Copy file name to clipboardExpand all lines: doc/api/process.md
-5Lines changed: 0 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1703,8 +1703,6 @@ added: v11.8.0
17031703
* `filename` {string} Name of the file where the report is written.
17041704
* `path` {string} Directory where the report is written.
17051705
**Default:** the current working directory of the Node.js process.
1706-
* `verbose` {boolean} Flag that controls additional verbose information on
1707-
report generation. **Default:** `false`.
17081706

17091707
Configures the diagnostic reporting behavior. Upon invocation, the runtime
17101708
is reconfigured to generate reports based on `options`. Several usage examples
@@ -1721,9 +1719,6 @@ process.report.setOptions({ filename: 'foo.json', path: '/home' });
17211719
// to `stdout` and `stderr`. Usage of these will result in report being written
17221720
// to the associated standard streams. URLs are not supported.
17231721
process.report.setOptions({ filename: 'stdout' });
1724-
1725-
// Enable verbose option on report generation.
1726-
process.report.setOptions({ verbose: true });
17271722
```
17281723

17291724
Signal based report generation is not supported on Windows.
Collapse file

‎doc/api/report.md‎

Copy file name to clipboardExpand all lines: doc/api/report.md
+2-9Lines changed: 2 additions & 9 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,6 @@ written.
401401
* `--diagnostic-report-signal` Sets or resets the signal for report generation
402402
(not supported on Windows). Default signal is `SIGUSR2`.
403403

404-
* `--diagnostic-report-verbose` Flag that enables additional information to be
405-
printed during report generation.
406-
407404
A report can also be triggered via an API call from a JavaScript application:
408405

409406
```js
@@ -495,8 +492,7 @@ process.report.setOptions({
495492
events: ['exception', 'fatalerror', 'signal'],
496493
signal: 'SIGUSR2',
497494
filename: 'myreport.json',
498-
path: '/home/nodeuser',
499-
verbose: true
495+
path: '/home/nodeuser'
500496
});
501497
```
502498

@@ -519,9 +515,6 @@ timestamp, PID and sequence number.
519515
URLs are not supported. Defaults to the current working directory of the
520516
Node.js process.
521517

522-
`verbose` specifies whether to print additional verbose messages
523-
pertinent to the report generation. Defaults to `false`.
524-
525518
```js
526519
// Trigger report only on uncaught exceptions.
527520
process.report.setOptions({ events: ['exception'] });
@@ -541,7 +534,7 @@ environment variables:
541534
NODE_OPTIONS="--experimental-report --diagnostic-report-uncaught-exception \
542535
--diagnostic-report-on-fatalerror --diagnostic-report-on-signal \
543536
--diagnostic-report-signal=SIGUSR2 --diagnostic-report-filename=./report.json \
544-
--diagnostic-report-directory=/home/nodeuser --diagnostic-report-verbose"
537+
--diagnostic-report-directory=/home/nodeuser"
545538
```
546539

547540
Specific API documentation can be found under
Collapse file

‎doc/node.1‎

Copy file name to clipboardExpand all lines: doc/node.1
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ to be generated on un-caught exceptions, if
114114
.Sy --experimental-report
115115
is enabled. Useful when inspecting JavaScript stack in conjunction with native stack and other runtime environment data.
116116
.
117-
.It Fl -diagnostic-report-verbose
118-
Flag that enables additional information to be printed during
119-
.Sy diagnostic report
120-
generation.
121-
.
122117
.It Fl -enable-fips
123118
Enable FIPS-compliant crypto at startup.
124119
Requires Node.js to be built with
Collapse file

‎lib/internal/process/report.js‎

Copy file name to clipboardExpand all lines: lib/internal/process/report.js
+1-9Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ let config = {
2525
events: [],
2626
signal: 'SIGUSR2',
2727
filename: '',
28-
path: '',
29-
verbose: false
28+
path: ''
3029
};
3130
const report = {
3231
setOptions(options) {
@@ -58,13 +57,6 @@ const report = {
5857
else
5958
throw new ERR_INVALID_ARG_TYPE('path', 'string', options.path);
6059

61-
if (typeof options.verbose === 'boolean')
62-
newConfig.verbose = options.verbose;
63-
else if (options.verbose === undefined)
64-
newConfig.verbose = false;
65-
else
66-
throw new ERR_INVALID_ARG_TYPE('verbose', 'boolean', options.verbose);
67-
6860
if (typeof options.signal === 'string')
6961
newConfig.signal = convertToValidSignal(options.signal);
7062
else if (options.signal === undefined)
Collapse file

‎src/node_options.cc‎

Copy file name to clipboardExpand all lines: src/node_options.cc
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ void PerIsolateOptions::CheckOptions(std::vector<std::string>* errors) {
7979
"--diagnostic-report-uncaught-exception option is valid only when "
8080
"--experimental-report is set");
8181
}
82-
83-
if (report_verbose) {
84-
errors->push_back("--diagnostic-report-verbose option is valid only when "
85-
"--experimental-report is set");
86-
}
8782
#endif // NODE_REPORT
8883
}
8984

@@ -339,11 +334,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser() {
339334
" (default: current working directory of Node.js process)",
340335
&PerIsolateOptions::report_directory,
341336
kAllowedInEnvironment);
342-
AddOption("--diagnostic-report-verbose",
343-
"verbose option for report generation(true|false)."
344-
" (default: false)",
345-
&PerIsolateOptions::report_verbose,
346-
kAllowedInEnvironment);
347337
#endif // NODE_REPORT
348338

349339
Insert(&EnvironmentOptionsParser::instance,
Collapse file

‎src/node_options.h‎

Copy file name to clipboardExpand all lines: src/node_options.h
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ class PerIsolateOptions : public Options {
153153
std::string report_signal;
154154
std::string report_filename;
155155
std::string report_directory;
156-
bool report_verbose;
157156
#endif // NODE_REPORT
158157
inline EnvironmentOptions* get_per_env_options();
159158
void CheckOptions(std::vector<std::string>* errors) override;
Collapse file

‎src/node_report_module.cc‎

Copy file name to clipboardExpand all lines: src/node_report_module.cc
-34Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,6 @@ void SyncConfig(const FunctionCallbackInfo<Value>& info) {
167167

168168
Utf8Value pathstr(env->isolate(), path);
169169

170-
// Report verbosity
171-
Local<String> verbosekey = FIXED_ONE_BYTE_STRING(env->isolate(), "verbose");
172-
Local<Value> verbose_unchecked;
173-
if (!obj->Get(context, verbosekey).ToLocal(&verbose_unchecked)) return;
174-
Local<Boolean> verbose;
175-
if (verbose_unchecked->IsUndefined() || verbose_unchecked->IsNull())
176-
verbose_unchecked = Boolean::New(env->isolate(), "verbose");
177-
verbose = verbose_unchecked.As<Boolean>();
178-
179-
bool verb = verbose->BooleanValue(context).FromJust();
180-
181170
if (sync) {
182171
static const std::string e = "exception";
183172
static const std::string s = "signal";
@@ -202,7 +191,6 @@ void SyncConfig(const FunctionCallbackInfo<Value>& info) {
202191
options->report_filename = *filestr;
203192
CHECK_NOT_NULL(*pathstr);
204193
options->report_directory = *pathstr;
205-
options->report_verbose = verb;
206194
} else {
207195
int i = 0;
208196
if (options->report_uncaught_exception &&
@@ -242,12 +230,6 @@ void SyncConfig(const FunctionCallbackInfo<Value>& info) {
242230
.ToLocal(&path_value))
243231
return;
244232
if (!obj->Set(context, pathkey, path_value).FromJust()) return;
245-
246-
if (!obj->Set(context,
247-
verbosekey,
248-
Boolean::New(env->isolate(), options->report_verbose))
249-
.FromJust())
250-
return;
251233
}
252234
}
253235

@@ -261,22 +243,6 @@ static void Initialize(Local<Object> exports,
261243
env->SetMethod(exports, "onUnCaughtException", OnUncaughtException);
262244
env->SetMethod(exports, "onUserSignal", OnUserSignal);
263245
env->SetMethod(exports, "syncConfig", SyncConfig);
264-
265-
// TODO(gireeshpunathil) if we are retaining this flag,
266-
// insert more verbose information at vital control flow
267-
// points. Right now, it is only this one.
268-
if (options->report_verbose) {
269-
std::cerr << "report: initialization complete, event flags:" << std::endl;
270-
std::cerr << "report_uncaught_exception: "
271-
<< options->report_uncaught_exception << std::endl;
272-
std::cerr << "report_on_signal: " << options->report_on_signal << std::endl;
273-
std::cerr << "report_on_fatalerror: " << options->report_on_fatalerror
274-
<< std::endl;
275-
std::cerr << "report_signal: " << options->report_signal << std::endl;
276-
std::cerr << "report_filename: " << options->report_filename << std::endl;
277-
std::cerr << "report_directory: " << options->report_directory << std::endl;
278-
std::cerr << "report_verbose: " << options->report_verbose << std::endl;
279-
}
280246
}
281247

282248
} // namespace report
Collapse file

‎test/node-report/test-diagnostic-report-verbose.js‎

Copy file name to clipboardExpand all lines: test/node-report/test-diagnostic-report-verbose.js
-43Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.