MCPcopy Create free account
hub / github.com/parse-community/parse-server / logStartupOptions

Function logStartupOptions

src/cli/utils/runner.js:3–33  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

1import program from './commander';
2
3function 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 'databaseAdapter',
10 'databaseURI',
11 'masterKey',
12 'maintenanceKey',
13 'push',
14 ];
15 for (const key in options) {
16 let value = options[key];
17 if (keysToRedact.includes(key)) {
18 value = '<REDACTED>';
19 }
20 if (typeof value === 'object') {
21 try {
22 value = JSON.stringify(value);
23 } catch {
24 if (value && value.constructor && value.constructor.name) {
25 value = value.constructor.name;
26 }
27 }
28 }
29 /* eslint-disable no-console */
30 console.log(`${key}: ${value}`);
31 /* eslint-enable no-console */
32 }
33}
34
35export default function ({ definitions, help, usage, start }) {
36 program.loadDefinitions(definitions);

Callers 1

runner.jsFile · 0.85

Calls 1

logMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…