azureai-optimizer
Version:
AI-Powered Azure Infrastructure Optimization via Model Context Protocol
42 lines • 1.63 kB
TypeScript
/**
* Logger Utility
* Centralized logging with configurable levels and formatting
*/
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
export interface LogEntry {
timestamp: string;
level: LogLevel;
component: string;
message: string;
data?: any;
}
export declare class Logger {
private component;
private static logLevel;
private static logLevels;
constructor(component: string);
static setLogLevel(level: LogLevel): void;
static getLogLevel(): LogLevel;
private shouldLog;
private formatMessage;
private getLevelIcon;
private getLevelColor;
private log;
private sendToExternalLogger;
debug(message: string, data?: any): void;
info(message: string, data?: any): void;
warn(message: string, data?: any): void;
error(message: string, data?: any): void;
startOperation(operation: string): void;
completeOperation(operation: string, duration?: number): void;
failOperation(operation: string, error: any): void;
time(label: string): void;
timeEnd(label: string): void;
metric(name: string, value: number, unit?: string, tags?: Record<string, string>): void;
securityEvent(event: string, details?: any): void;
apiCall(method: string, url: string, statusCode?: number, duration?: number): void;
userAction(action: string, userId?: string, details?: any): void;
costEvent(event: string, amount?: number, currency?: string, details?: any): void;
toolExecution(toolName: string, status: 'start' | 'success' | 'error', duration?: number, error?: any): void;
}
//# sourceMappingURL=logger.d.ts.map