Skip to content

Commit cb2a357

Browse files
committed
remove logging by default
1 parent 7a198f4 commit cb2a357

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/cli/utils/runner.js

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
import program from './commander';
22

33
function logStartupOptions(options) {
4+
if (!options.verbose) {
5+
return;
6+
}
7+
// Keys that may include sensitive information that will be redacted in logs
8+
const keysToRedact = [
9+
'databaseURI',
10+
'masterKey',
11+
'maintenanceKey',
12+
'push',
13+
];
414
for (const key in options) {
515
let value = options[key];
6-
if (key == 'masterKey') {
7-
value = '***REDACTED***';
8-
}
9-
if (key == 'push' && options.verbose != true) {
10-
value = '***REDACTED***';
16+
if (keysToRedact.includes(key)) {
17+
value = '<REDACTED>';
1118
}
1219
if (typeof value === 'object') {
1320
try {

0 commit comments

Comments
 (0)