mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix: log email and sms
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user