Logger Module — Public API
Centralized logging for the MCP server framework. Only exports what consumers need. Internal components (writers, formatters, scrubbing, context, constants) are accessed via direct imports within the logger module.
import { logger, configureLogger } from './logger/index.js';configureLogger({ LOG_LEVEL: 'info', LOG_FORMAT: 'text', MCP_TRANSPORT: 'http', NODE_ENV: 'production', SERVER_NAME: 'my-mcp-server', SERVER_VERSION: '1.0.0',});logger.info('Server started on port %d', 8000);const apiLogger = logger.child({ component: 'api' });apiLogger.debug('Processing request'); Copy
import { logger, configureLogger } from './logger/index.js';configureLogger({ LOG_LEVEL: 'info', LOG_FORMAT: 'text', MCP_TRANSPORT: 'http', NODE_ENV: 'production', SERVER_NAME: 'my-mcp-server', SERVER_VERSION: '1.0.0',});logger.info('Server started on port %d', 8000);const apiLogger = logger.child({ component: 'api' });apiLogger.debug('Processing request');
Logger Module — Public API
Centralized logging for the MCP server framework. Only exports what consumers need. Internal components (writers, formatters, scrubbing, context, constants) are accessed via direct imports within the logger module.
Usage