UNPKG

maplestorysea-mcp-server

Version:

NEXON MapleStory SEA API MCP Server for Claude Desktop - Complete character info, union details, guild data, rankings optimized for SEA servers

71 lines 3.07 kB
/** * Logging utilities for MCP Maple * Provides structured logging for API operations and errors */ export interface LogContext { operation?: string; characterName?: string; guildName?: string; endpoint?: string; params?: Record<string, any>; duration?: number; error?: any; success?: boolean; worldName?: string; toolName?: string; [key: string]: any; } export declare class McpLogger { private logger; constructor(component?: string); info(message: string, context?: LogContext): void; warn(message: string, context?: LogContext): void; error(message: string, context?: LogContext): void; debug(message: string, context?: LogContext): void; logApiRequest(endpoint: string, params?: Record<string, any>): void; logApiResponse(endpoint: string, duration: number, success: boolean): void; logApiError(endpoint: string, error: any, duration?: number): void; logCharacterOperation(operation: string, characterName: string, context?: any): void; logGuildOperation(operation: string, guildName: string, worldName?: string, context?: any): void; logMcpOperation(operation: string, toolName: string, context?: any): void; logSecurityEvent(event: string, context?: LogContext): void; logAuditEvent(action: string, resource: string, user?: string, context?: LogContext): void; logPerformanceMetric(metric: string, value: number, unit?: string, context?: LogContext): void; logCacheOperation(operation: 'hit' | 'miss' | 'set' | 'delete' | 'clear', key: string, context?: LogContext): void; logRecoveryAttempt(strategy: string, error: Error, attempt: number, success: boolean, context?: LogContext): void; logHealthCheck(component: string, status: 'healthy' | 'unhealthy' | 'degraded', details?: any): void; logRateLimit(action: 'applied' | 'exceeded' | 'reset', context?: LogContext): void; logError(error: Error, context?: LogContext): void; private sanitizeLogData; flushLogs(): Promise<void>; createChild(context: LogContext): McpLogger; } export declare class PerformanceMonitor { private metrics; private logger; constructor(logger: McpLogger); startTimer(operation: string): () => void; recordMetric(operation: string, duration: number): void; getMetrics(): Record<string, { count: number; avgTime: number; minTime: number; maxTime: number; totalTime: number; }>; clearMetrics(): void; logSummary(): void; } export declare class RequestTracker { private requests; private logger; constructor(logger: McpLogger); startRequest(requestId: string, context: LogContext): void; endRequest(requestId: string, success: boolean, additionalContext?: LogContext): void; getActiveRequests(): string[]; cleanupStaleRequests(maxAge?: number): void; } export declare const defaultLogger: McpLogger; export declare const performanceMonitor: PerformanceMonitor; export declare const requestTracker: RequestTracker; //# sourceMappingURL=logger.d.ts.map