mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-11-10 17:47:07 +08:00
Log client ID to gelf
This commit is contained in:
parent
a44a946496
commit
d6448df3f0
2 changed files with 21 additions and 11 deletions
|
@ -55,9 +55,17 @@ module.exports = {
|
|||
this.id
|
||||
);
|
||||
|
||||
let logdata = {
|
||||
short_message: '[CLIENT ID]',
|
||||
_mail_action: 'client_id',
|
||||
_user: this.session && this.session.user && this.session.user.id && this.session.user.id.toString(),
|
||||
_sess: this.id
|
||||
};
|
||||
|
||||
Object.keys(clientId)
|
||||
.sort((a, b) => allowedKeys.indexOf(a) - allowedKeys.indexOf(b))
|
||||
.forEach(key => {
|
||||
logdata[`_client_id_${key}`] = clientId[key];
|
||||
this._server.logger.info(
|
||||
{
|
||||
tnx: 'id',
|
||||
|
@ -70,6 +78,8 @@ module.exports = {
|
|||
clientId[key]
|
||||
);
|
||||
});
|
||||
|
||||
this._server.loggelf(logdata);
|
||||
}
|
||||
|
||||
// Create response ID serverIdList
|
||||
|
@ -93,9 +103,9 @@ module.exports = {
|
|||
attributes: serverIdList.length
|
||||
? [serverIdList]
|
||||
: {
|
||||
type: 'atom',
|
||||
value: 'NIL'
|
||||
}
|
||||
type: 'atom',
|
||||
value: 'NIL'
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
|
|
16
package.json
16
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "wildduck",
|
||||
"version": "1.23.5",
|
||||
"version": "1.23.6",
|
||||
"description": "IMAP/POP3 server built with Node.js and MongoDB",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
|
@ -16,20 +16,20 @@
|
|||
"license": "EUPL-1.1+",
|
||||
"devDependencies": {
|
||||
"ajv": "6.12.0",
|
||||
"apidoc": "0.20.0",
|
||||
"apidoc": "0.20.1",
|
||||
"browserbox": "0.9.1",
|
||||
"chai": "4.2.0",
|
||||
"eslint": "6.8.0",
|
||||
"eslint-config-nodemailer": "1.2.0",
|
||||
"eslint-config-prettier": "6.10.0",
|
||||
"grunt": "1.0.4",
|
||||
"eslint-config-prettier": "6.10.1",
|
||||
"grunt": "1.1.0",
|
||||
"grunt-cli": "1.3.2",
|
||||
"grunt-eslint": "22.0.0",
|
||||
"grunt-mocha-test": "0.13.3",
|
||||
"grunt-shell-spawn": "0.4.0",
|
||||
"grunt-wait": "0.3.0",
|
||||
"mailparser": "2.7.7",
|
||||
"mocha": "7.1.0",
|
||||
"mocha": "7.1.1",
|
||||
"request": "2.88.2",
|
||||
"supertest": "4.0.2"
|
||||
},
|
||||
|
@ -59,7 +59,7 @@
|
|||
"mongodb": "3.5.5",
|
||||
"mongodb-extended-json": "1.11.0",
|
||||
"node-forge": "0.9.1",
|
||||
"nodemailer": "6.4.5",
|
||||
"nodemailer": "6.4.6",
|
||||
"npmlog": "4.1.2",
|
||||
"openpgp": "4.10.1",
|
||||
"pem": "1.14.4",
|
||||
|
@ -68,13 +68,13 @@
|
|||
"restify": "8.5.1",
|
||||
"restify-logger": "2.0.1",
|
||||
"seq-index": "1.1.0",
|
||||
"smtp-server": "3.5.0",
|
||||
"smtp-server": "3.6.0",
|
||||
"speakeasy": "2.0.0",
|
||||
"u2f": "0.1.3",
|
||||
"utf7": "1.0.2",
|
||||
"uuid": "7.0.2",
|
||||
"wild-config": "1.5.0",
|
||||
"yargs": "15.3.0"
|
||||
"yargs": "15.3.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
Loading…
Reference in a new issue