improve logger
This commit is contained in:
@@ -31,7 +31,7 @@ export class ImapInstance {
|
||||
});
|
||||
|
||||
this.imap.once("error", (err) => {
|
||||
logger.error("Imap error for " + this.account.user + ": " + err);
|
||||
logger.err("Imap error for " + this.account.user + ": " + err);
|
||||
});
|
||||
|
||||
this.imap.once("end", () => {
|
||||
@@ -47,7 +47,7 @@ export class ImapInstance {
|
||||
this.boxes.push(new Box(this.imap, mailboxes[0].mailbox_id, mailboxes[0].mailbox_name));
|
||||
} else {
|
||||
this.imap.getBoxes("", (err, boxes) => {
|
||||
if (err) logger.error(err);
|
||||
if (err) logger.err(err);
|
||||
const allBoxName = this.getAllBox(boxes);
|
||||
registerMailbox(this.account.id, allBoxName).then((mailboxId) => {
|
||||
this.boxes.push(new Box(this.imap, mailboxId, allBoxName));
|
||||
|
||||
Reference in New Issue
Block a user