Skip to content

Commit

Permalink
another quick touch up to the error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuwiey committed Oct 2, 2014
1 parent 18dc873 commit c2e80d4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/hooks/sockets/lib/loadSocketIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,17 @@ module.exports = function (sails) {
// until it comes back

client.on('ready', function() {
sails.log.debug('[OK] Redis ' + id + ' is up. Connections: ', client.connections);
sails.log.debug('RedisClient::Events[ready]: [OK] Redis "' + id + '" is up. Connections: ', client.connections);
});

client.on('end', function() {
sails.log.debug(id + ' Redis Client Connected:', client.connected);
sails.log.debug('RedisClient::Events[end]: "' + id + '" , Connected:', client.connected);
});

client.on('error', function (err) {
sails.log.error('Redis client error');
sails.log.error('RedisClient::Events[error]: "' + id + '" , ' + err);
if (/ECONNREFUSED/g.test(err)) {
sails.log.error('Waiting for ' + id + ' redis. Connections:', client.connections);
} else {
sails.log.error('Redis ' + id + ' error event - ' + client.host + ":" + client.port + " - " + err);
sails.log.error('Waiting for "' + id + '" redis client to come back online. Connections:', client.connections);
}
});

Expand Down

0 comments on commit c2e80d4

Please sign in to comment.