MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / getNumericLoggingLevel

Function getNumericLoggingLevel

Extension/src/common.ts:1611–1633  ·  view source on GitHub ↗
(loggingLevel: string | undefined)

Source from the content-addressed store, hash-verified

1609}
1610
1611export function getNumericLoggingLevel(loggingLevel: string | undefined): number {
1612 if (!loggingLevel) {
1613 return 1;
1614 }
1615 if (isIntegral(loggingLevel)) {
1616 return parseInt(loggingLevel, 10);
1617 }
1618 const lowerCaseLoggingLevel: string = loggingLevel.toLowerCase();
1619 switch (lowerCaseLoggingLevel) {
1620 case "error":
1621 return 1;
1622 case "warning":
1623 return 3;
1624 case "information":
1625 return 5;
1626 case "debug":
1627 return 6;
1628 case "none":
1629 return 0;
1630 default:
1631 return -1;
1632 }
1633}
1634
1635export function mergeOverlappingRanges(ranges: Range[]): Range[] {
1636 // Fix any reversed ranges. Not sure if this is needed, but ensures the input is sanitized.

Callers 2

getLoggingLevelFunction · 0.85

Calls 1

isIntegralFunction · 0.85

Tested by

no test coverage detected