Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nodemailer/wildduck
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Oct 16, 2023
2 parents c00cc02 + 667f992 commit 73acc42
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions imap-core/lib/imap-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,24 @@ class IMAPConnection extends EventEmitter {

this._closingTimeout = null;

this.logger = {};
['info', 'debug', 'error'].forEach(level => {
this.logger[level] = (...args) => {
if (!this.ignore) {
this._server.logger[level](...args);
}
};
});
if (server.logger) {
this.logger = server.logger;
} else {
this.logger = {};
['info', 'debug', 'error'].forEach(level => {
this.logger[level] = (...args) => {
if (!this.ignore) {
this._server.logger[level](...args);
}
};
});
}

this.loggelf = () => false;
if (server.loggelf) {
this.loggelf = server.loggelf;
} else {
this.loggelf = () => false;
}
}

/**
Expand Down

0 comments on commit 73acc42

Please sign in to comment.