Skip to main content
Glama
logger.tsโ€ข1.2 kB
// Logger interface export interface Logger { info: (message: string, data?: any) => void; error: (message: string, data?: any) => void; warn: (message: string, data?: any) => void; } // Logger implementation - can be controlled externally let loggingEnabled = true; export const logger: Logger = { info: (message: string, data?: any) => { if (loggingEnabled) { const timestamp = new Date().toISOString(); const logEntry = { timestamp, level: 'info', message, ...(data && { data }) }; console.error(JSON.stringify(logEntry)); } }, error: (message: string, data?: any) => { if (loggingEnabled) { const timestamp = new Date().toISOString(); const logEntry = { timestamp, level: 'error', message, ...(data && { data }) }; console.error(JSON.stringify(logEntry)); } }, warn: (message: string, data?: any) => { if (loggingEnabled) { const timestamp = new Date().toISOString(); const logEntry = { timestamp, level: 'warn', message, ...(data && { data }) }; console.warn(JSON.stringify(logEntry)); } } }; // Control logging externally export function setLogging(enabled: boolean) { loggingEnabled = enabled; }

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/sieteunoseis/mcp-cisco-support'

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