diff --git a/imap-core/lib/commands/append.js b/imap-core/lib/commands/append.js index 7f287c26..18b7b6be 100644 --- a/imap-core/lib/commands/append.js +++ b/imap-core/lib/commands/append.js @@ -113,7 +113,7 @@ module.exports = { this._server.onAppend(path, flags, internaldate, raw, this.session, (err, success, info) => { Object.keys(info || {}).forEach(key => { - logdata['_' + key.replace(/[A-Z]+/g, c => '_' + c.toLowerCase())] = info.key; + logdata['_' + key.replace(/[A-Z]+/g, c => '_' + c.toLowerCase())] = info[key]; }); if (err) { diff --git a/imap-core/lib/commands/fetch.js b/imap-core/lib/commands/fetch.js index c2180a4f..02f9b6f3 100644 --- a/imap-core/lib/commands/fetch.js +++ b/imap-core/lib/commands/fetch.js @@ -244,13 +244,13 @@ module.exports = { let logdata = { short_message: '[FETCH] ' + this.selected.mailbox, _user: this.session.user.id.toString(), - _mailbox: this.selected.mailbox, + _mailbox: this.selected.mailbox.toString(), _sess: this.id, _mark_seen: markAsSeen ? 'yes' : 'no', _is_uid: isUid ? 'yes' : 'no', _message_count: messages.length, _modseq: changedSince, - _full_message: JSON.stringify(query, false, 2) + _query: imapHandler.compiler(command) }; this._server.onFetch( @@ -266,7 +266,7 @@ module.exports = { this.session, (err, success, info) => { Object.keys(info || {}).forEach(key => { - logdata['_' + key.replace(/[A-Z]+/g, c => '_' + c.toLowerCase())] = info.key; + logdata['_' + key.replace(/[A-Z]+/g, c => '_' + c.toLowerCase())] = info[key]; }); if (err) {