8 lines
317 B
TypeScript
8 lines
317 B
TypeScript
import { ErrorReporter } from '../../interfaces/ErrorReporter';
|
|
|
|
export class ConsoleErrorReporter implements ErrorReporter {
|
|
report(error: Error, context?: unknown): void {
|
|
const timestamp = new Date().toISOString();
|
|
console.error(`[${timestamp}] Error reported:`, error.message, { error, context });
|
|
}
|
|
} |