MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / parseLogLevel

Function parseLogLevel

apps/kimi-code/src/cli/sub/server/shared.ts:127–135  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

125}
126
127export function parseLogLevel(raw: string | undefined): ServerLogLevel {
128 if (raw === undefined) return DEFAULT_LOG_LEVEL;
129 if ((VALID_LOG_LEVELS as readonly string[]).includes(raw)) {
130 return raw as ServerLogLevel;
131 }
132 throw new Error(
133 `error: invalid --log-level value: ${raw} (allowed: ${VALID_LOG_LEVELS.join(', ')})`,
134 );
135}
136
137export function serverOrigin(host: string, port: number): string {
138 return `http://${host}:${port}`;

Callers 3

addLifecycleCommandsFunction · 0.90
server.test.tsFile · 0.85
parseServerOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected