fix: log email and sms

This commit is contained in:
Nathnael
2026-08-10 06:56:07 +00:00
parent 3d53f67156
commit 124c51071b
2 changed files with 9 additions and 5 deletions

View File

@@ -51,8 +51,11 @@ export class EmailClientService implements OnApplicationBootstrap {
this.logger.log(
`EMAIL publish to RabbitMQ [${process.env.EMAIL_QUEUE ?? "email_queue"}] pattern='send-email' confirmed=${queued}`,
);
// Recipient + content are PII — debug only.
this.logger.debug(`EMAIL payload to=${dto.to} subject="${dto.subject}"`);
// Full content logged on purpose (audit of what actually left the API).
// Note: recipient + body are PII and land in plain application logs.
this.logger.log(
`EMAIL payload to=${dto.to} subject="${dto.subject}" text="${dto.text ?? ""}" html="${dto.html ?? ""}"`,
);
return { queued };
}

View File

@@ -52,8 +52,9 @@ export class SmsClientService implements OnApplicationBootstrap {
this.logger.log(
`SMS publish to RabbitMQ [${process.env.SMS_QUEUE ?? "sms_queue"}] pattern='send-sms' confirmed=${queued}`,
);
// Recipient + content are PII — debug only.
this.logger.debug(`SMS payload to=${dto.to} text="${dto.message}"`);
// Full content logged on purpose (audit of what actually left the API).
// Note: recipient + body are PII and land in plain application logs.
this.logger.log(`SMS payload to=${dto.to} text="${dto.message}"`);
return { queued };
}
@@ -81,7 +82,7 @@ export class SmsClientService implements OnApplicationBootstrap {
this.logger.log(
`BULK SMS publish to RabbitMQ [${process.env.SMS_QUEUE ?? "sms_queue"}] pattern='ozeking-bulk-sms' count=${messages.length} confirmed=${queued}`,
);
this.logger.debug(`BULK SMS payload messages=${JSON.stringify(messages)}`);
this.logger.log(`BULK SMS payload messages=${JSON.stringify(messages)}`);
return { queued };
}