Moved server.log statement to the right place

This commit is contained in:
Jesús Ángel González 2018-04-02 15:05:15 +02:00
parent 3957fdc150
commit eb4d0b85a7

View File

@ -114,6 +114,7 @@ module.exports = (server, options) => {
}); });
} }
} catch(error){ } catch(error){
server.log([blueWazuh, 'wazuh-api', 'error'], error.message || error);
if(error.code === 'ECONNREFUSED'){ if(error.code === 'ECONNREFUSED'){
wapi_config.password = '****' wapi_config.password = '****'
wapi_config.apiIsDown = true; wapi_config.apiIsDown = true;
@ -124,7 +125,6 @@ module.exports = (server, options) => {
error : 8, error : 8,
message : error.message || error message : error.message || error
}); });
server.log([blueWazuh, 'wazuh-api', 'error'], error.message || error);
} }
} }
}; };