logging update

This commit is contained in:
Andris Reinman 2018-11-23 11:22:14 +02:00
parent 54009bfdb0
commit d940d2905e
2 changed files with 4 additions and 4 deletions

View file

@ -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) {

View file

@ -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) {