use _code instead of _error_code for gelf

This commit is contained in:
Andris Reinman 2018-11-23 11:48:23 +02:00
parent d85bc3a8c7
commit ecc9e7e5b7
4 changed files with 8 additions and 8 deletions

2
api.js
View file

@ -67,7 +67,7 @@ const serverOptions = {
_api_response: body.success ? 'success' : 'fail',
_error: body.error,
_error_code: body.code,
_code: body.code,
_size: size
};

View file

@ -119,7 +119,7 @@ module.exports = {
if (err) {
logdata._error = err.message;
logdata._error_code = err.code;
logdata._code = err.code;
logdata._response = err.response;
this._server.loggelf(logdata);
return callback(err);

View file

@ -272,7 +272,7 @@ module.exports = {
if (err) {
logdata._error = err.message;
logdata._error_code = err.code;
logdata._code = err.code;
logdata._response = err.response;
this._server.loggelf(logdata);
return callback(err);

View file

@ -393,7 +393,7 @@ class UserHandler {
short_message: '[AUTHFAIL] ' + username,
full_message: err.stack,
_error: err.message,
_error_code: err.code,
_code: err.code,
_auth_result: 'error',
_username: username,
_domain: userDomain,
@ -458,7 +458,7 @@ class UserHandler {
short_message: '[AUTHFAIL] ' + username,
full_message: err.stack,
_error: err.message,
_error_code: err.code,
_code: err.code,
_auth_result: 'error',
_username: username,
_domain: userDomain,
@ -478,7 +478,7 @@ class UserHandler {
short_message: '[AUTHFAIL] ' + username,
full_message: err.stack,
_error: err.message,
_error_code: err.code,
_code: err.code,
_auth_result: 'error',
_username: username,
_domain: userDomain,
@ -525,7 +525,7 @@ class UserHandler {
short_message: '[AUTHFAIL] ' + username,
full_message: err.stack,
_error: err.message,
_error_code: err.code,
_code: err.code,
_auth_result: 'error',
_username: username,
_domain: userDomain,
@ -600,7 +600,7 @@ class UserHandler {
short_message: '[AUTHFAIL] ' + username,
full_message: err.stack,
_error: err.message || 'Authentication failed',
_error_code: err.code,
_code: err.code,
_auth_result: 'fail',
_username: username,
_domain: userDomain,