mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
chore(server): add logs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user