refactor(logging): replace console usage with logger

This commit is contained in:
William Valentin
2025-09-23 12:19:15 -07:00
parent 16bd4a8b20
commit 10d1de91fe
11 changed files with 76 additions and 44 deletions

View File

@@ -1,6 +1,8 @@
/**
* Mock email service for sending verification emails
*/
import { logger } from './logging';
export class EmailService {
/**
* Simulates sending a verification email with a link to /verify-email?token=${token}
@@ -10,10 +12,11 @@ export class EmailService {
async sendVerificationEmail(email: string, token: string): Promise<void> {
// In a real implementation, this would send an actual email
// For this demo, we'll just log the action
console.warn(
`📧 Sending verification email to ${email} with token: ${token}`
logger.info(
`Sending verification email to ${email} with token: ${token}`,
'EMAIL'
);
console.warn(`🔗 Verification link: /verify-email?token=${token}`);
logger.info(`Verification link: /verify-email?token=${token}`, 'EMAIL');
// Simulate network delay
await new Promise(resolve => setTimeout(resolve, 500));