Skip to main content
Glama

Crew Qualifications & Certifications MCP Server

by jbandu
logger.ts1.16 kB
/** * Logging utility using Winston */ import winston from 'winston'; import config from '../config/index.js'; const logFormat = winston.format.combine( winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }), winston.format.errors({ stack: true }), winston.format.splat(), config.logging.format === 'json' ? winston.format.json() : winston.format.printf(({ level, message, timestamp, ...metadata }) => { let msg = `${timestamp} [${level.toUpperCase()}]: ${message}`; if (Object.keys(metadata).length > 0) { msg += ` ${JSON.stringify(metadata)}`; } return msg; }) ); export const logger = winston.createLogger({ level: config.logging.level, format: logFormat, transports: [ new winston.transports.Console({ stderrLevels: ['error'], }), ], }); // Add file transport in production if (config.environment === 'production') { logger.add( new winston.transports.File({ filename: 'logs/error.log', level: 'error', }) ); logger.add( new winston.transports.File({ filename: 'logs/combined.log', }) ); } export default logger;

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/jbandu/crew-mcp'

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