Skip to main content
Glama

AI Code Toolkit

by AgiFlow
logger.ts962 B
import * as os from 'node:os'; import * as path from 'node:path'; import pino from 'pino'; // Create logs directory path in OS temp directory const logsDir = path.join(os.tmpdir(), 'scaffold-mcp-logs'); // Create a pino logger that writes to file synchronously // Using sync: true to avoid "sonic boom is not ready yet" errors on quick exits export const logger = pino( { level: process.env.LOG_LEVEL || 'debug', timestamp: pino.stdTimeFunctions.isoTime, }, pino.destination({ dest: path.join(logsDir, 'scaffold-mcp.log'), mkdir: true, sync: true, // Synchronous writes for CLI reliability }), ); // Export convenience methods export const log = { debug: (msg: string, ...args: any[]) => logger.debug({ args }, msg), info: (msg: string, ...args: any[]) => logger.info({ args }, msg), warn: (msg: string, ...args: any[]) => logger.warn({ args }, msg), error: (msg: string, ...args: any[]) => logger.error({ args }, msg), };

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/AgiFlow/aicode-toolkit'

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