@casoon/auditmysite
Version:
Professional website analysis suite with robust accessibility testing, Core Web Vitals performance monitoring, SEO analysis, and content optimization insights. Features isolated browser contexts, retry mechanisms, and comprehensive API endpoints for profe
49 lines • 1.55 kB
TypeScript
/**
* Structured logging implementation for AuditMySite
*
* Provides a clean, consistent logging interface that can be easily
* configured and replaced without affecting business logic.
*/
import { ILogger } from '../analyzers/interfaces';
export interface LoggerConfig {
readonly level: LogLevel;
readonly prefix?: string;
readonly enableTimestamps?: boolean;
readonly enableColors?: boolean;
}
export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'success';
export declare class StructuredLogger implements ILogger {
private readonly config;
constructor(config?: Partial<LoggerConfig>);
debug(message: string, data?: any): void;
info(message: string, data?: any): void;
warn(message: string, data?: any): void;
error(message: string, error?: Error | any): void;
success(message: string, data?: any): void;
/**
* Create a child logger with additional context
*/
child(prefix: string): StructuredLogger;
private shouldLog;
private log;
private colorize;
}
/**
* Silent logger for testing or when logging is not needed
*/
export declare class SilentLogger implements ILogger {
debug(): void;
info(): void;
warn(): void;
error(): void;
success(): void;
}
/**
* Default logger instance for convenience
*/
export declare const defaultLogger: StructuredLogger;
/**
* Create a logger for a specific component
*/
export declare function createLogger(component: string, level?: LogLevel): ILogger;
//# sourceMappingURL=structured-logger.d.ts.map