sfcc-dev-mcp
Version:
MCP server for Salesforce B2C Commerce Cloud development assistance including logs, debugging, and development tools
91 lines • 3.01 kB
TypeScript
/**
* Log parsing, entry processing, and data manipulation
*/
import { Logger } from '../../utils/logger.js';
import type { LogEntry, LogLevel, LogFileMetadata, ProcessedLogEntry, JobLogInfo } from './log-types.js';
export declare class LogProcessor {
private logger;
constructor(logger: Logger);
/**
* Process log files and extract entries with priority ordering
*/
processLogFiles(files: LogFileMetadata[], level: LogLevel, fileContents: Map<string, string>): Promise<LogEntry[]>;
/**
* Sort files by modification date (newest first) for processing priority
*/
private sortFilesByPriority;
/**
* Sort and limit log entries by recency
*/
sortAndLimitEntries(entries: LogEntry[], limit: number): LogEntry[];
/**
* Extract formatted log entries from sorted entries
*/
extractFormattedEntries(sortedEntries: LogEntry[]): string[];
/**
* Process search results from file contents
*/
processSearchResults(files: LogFileMetadata[], fileContents: Map<string, string>, pattern: string, limit: number): string[];
/**
* Count log levels in content
*/
countLogLevels(content: string): {
errorCount: number;
warningCount: number;
infoCount: number;
debugCount: number;
};
/**
* Extract key issues from error content
*/
extractKeyIssues(content: string): string[];
/**
* Parse individual log entry for structured data
*/
parseLogEntry(entry: string): ProcessedLogEntry;
/**
* Extract source information from log entry
*/
private extractSourceFromEntry;
/**
* Group entries by source/category
*/
groupEntriesBySource(entries: ProcessedLogEntry[]): Map<string, ProcessedLogEntry[]>;
/**
* Filter entries by time range
*/
filterEntriesByTimeRange(entries: ProcessedLogEntry[], startTime?: Date, endTime?: Date): ProcessedLogEntry[];
/**
* Process job log files - handles all log levels in one file
*/
processJobLogFiles(jobLogs: JobLogInfo[], level: LogLevel | 'all', fileContents: Map<string, string>): Promise<LogEntry[]>;
/**
* Parse all log levels from job log content
*/
private parseAllLogLevelsFromContent;
/**
* Check if a line is a log entry (contains timestamp and level)
*/
private isLogEntry;
/**
* Filter job log entries by specific log level
*/
filterJobLogEntriesByLevel(entries: string[], level: LogLevel): string[];
/**
* Extract job execution summary from job log content
*/
extractJobExecutionSummary(content: string): {
startTime?: string;
endTime?: string;
status?: string;
duration?: string;
errorCount: number;
warningCount: number;
steps: string[];
};
/**
* Format duration in milliseconds to human readable string
*/
private formatDuration;
}
//# sourceMappingURL=log-processor.d.ts.map