MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / readCliLogLevel

Function readCliLogLevel

apps/cli/src/main.ts:1628–1640  ·  view source on GitHub ↗
(argv: ReadonlyArray<string>)

Source from the content-addressed store, hash-verified

1626};
1627
1628const readCliLogLevel = (argv: ReadonlyArray<string>): string | undefined => {
1629 for (let index = 0; index < argv.length; index += 1) {
1630 const token = argv[index];
1631 if (!token) continue;
1632 if (token === "--log-level") {
1633 return argv[index + 1];
1634 }
1635 if (token.startsWith("--log-level=")) {
1636 return token.slice("--log-level=".length);
1637 }
1638 }
1639 return undefined;
1640};
1641
1642const shouldPrintVerboseErrors = (argv: ReadonlyArray<string>): boolean => {
1643 const level = readCliLogLevel(argv)?.trim().toLowerCase();

Callers 1

shouldPrintVerboseErrorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected