refactor(logging): replace console usage with logger
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user