logging
This commit is contained in:
8
apps/website/lib/infrastructure/ConsoleErrorReporter.ts
Normal file
8
apps/website/lib/infrastructure/ConsoleErrorReporter.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
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 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user