Clean up argument for long stacktraces
MODIFY
lib/main.js
lib/main.js
@@ -18,7 +18,7 @@ import { inspectObject } from './utils';
async function preflightChecks (parser, args, throwInsteadOfExit = false) {
try {
checkNodeOk();
- if (args.asyncTrace) {
+ if (args.longStacktrace) {
require('longjohn').async_trace_limit = -1;
}
if (args.showConfig) {

MODIFY
lib/parser.js
lib/parser.js
@@ -333,8 +333,8 @@ const args = [
nargs: 0,
}],
- [['--async-trace'], {
- dest: 'asyncTrace',
+ [['--long-stacktrace'], {
+ dest: 'longStacktrace',
defaultValue: false,
required: false,
action: 'storeTrue',
@@ -369,6 +369,27 @@ const args = [
help: 'Set the default desired capabilities, which will be set on each ' +
'session unless overridden by received capabilities.'
}],
+
+ [['--enable-heapdump'], {
+ defaultValue: false,
+ dest: 'heapdumpEnabled',
+ action: 'storeTrue',
+ required: false,
+ help: 'Enable collection of NodeJS memory heap dumps. This is useful for memory leaks lookup',
+ nargs: 0
+ }],
+
+ [['--relaxed-security'], {
+ defaultValue: false,
+ dest: 'relaxedSecurityEnabled',
+ action: 'storeTrue',
+ required: false,
+ help: 'Disable additional security checks, so it is possible to use some advanced features, provided ' +
+ 'by drivers supporting this option. Only enable it if all the ' +
+ 'clients are in the trusted network and it\'s not the case if a client could potentially ' +
+ 'break out of the session sandbox.',
+ nargs: 0
+ }],
];
const deprecatedArgs = [
@@ -730,26 +751,14 @@ const deprecatedArgs = [
nargs: 0,
}],
- [['--enable-heapdump'], {
+ [['--async-trace'], {
+ dest: 'longStacktrace',
defaultValue: false,
- dest: 'heapdumpEnabled',
- action: 'storeTrue',
required: false,
- help: 'Enable collection of NodeJS memory heap dumps. This is useful for memory leaks lookup',
- nargs: 0
- }],
-
- [['--relaxed-security'], {
- defaultValue: false,
- dest: 'relaxedSecurityEnabled',
action: 'storeTrue',
- required: false,
- help: 'Disable additional security checks, so it is possible to use some advanced features, provided ' +
- 'by drivers supporting this option. Only enable it if all the ' +
- 'clients are in the trusted network and it\'s not the case if a client could potentially ' +
- 'break out of the session sandbox.',
- nargs: 0
- }]
+ deprecatedFor: '--long-stacktrace',
+ help: '[DEPRECATED] - Add long stack traces to log entries. Recommended for debugging only.',
+ }],
];
function updateParseArgsForDefaultCapabilities (parser) {

MODIFY
package.json
package.json
"dateformat": "^3.0.3",
"find-root": "^1.1.0",
"lodash": "=4.17.9",
+ "longjohn": "^0.2.12",
"npmlog": "4.x",
"request": "^2.81.0",
"request-promise": "4.x",

Clean up argument for long stacktraces (#11174)