Skip to main content
Glama

VSCode Language Server MCP Extension

by aaddrick
logger.ts945 B
type LogLevel = 'debug' | 'info' | 'warn' | 'error'; const LOG_LEVELS: Record<LogLevel, number> = { debug: 0, info: 1, warn: 2, error: 3 }; export class Logger { private level: LogLevel = 'info'; setLevel(level: LogLevel) { this.level = level; } private shouldLog(level: LogLevel): boolean { return LOG_LEVELS[level] >= LOG_LEVELS[this.level]; } debug(...args: any[]) { if (this.shouldLog('debug')) { console.log('[MCP LS Debug]', ...args); } } info(...args: any[]) { if (this.shouldLog('info')) { console.log('[MCP LS Info]', ...args); } } warn(...args: any[]) { if (this.shouldLog('warn')) { console.warn('[MCP LS Warn]', ...args); } } error(...args: any[]) { if (this.shouldLog('error')) { console.error('[MCP LS Error]', ...args); } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aaddrick/vscode-mcp-language-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server