Compare commits

..

1 Commits

Author SHA1 Message Date
DarkSky 1a8d884f8e chore(server): add logs 2026-05-30 16:53:16 +08:00
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ export class MailJob {
}
return undefined;
} catch (e) {
this.logger.error(`Failed to send mail [${name}] to [${to}]`, e);
this.logger.error(`Failed to send mail [${name}] to [${to}]`, e, props);
// wait for a while before retrying
const retryDelay = this.calculateRetryDelay(startTime);
await sleep(retryDelay);
@@ -140,7 +140,11 @@ export class MailSender {
return true;
} catch (e) {
metrics.mail.counter('failed_total').add(1, { name });
this.logger.error(`Failed to send mail [${name}].`, e);
this.logger.error(`Failed to send mail [${name}].`, e, {
subject: options.subject,
from: options.from,
to: options.to,
});
return false;
}
}