提交 740d52a1f8be22a178cc149ea2d140c61bd475d0

作者 Nick Baugh
1 个父辈 a22b259f

Fixed handling of error output on redis/mongo connection failures

... ... @@ -13,7 +13,9 @@ exports = module.exports = function(logger, settings) {
13 13 settings.mongo.opts
14 14 )
15 15
16   - connection.on('error', logger.error)
  16 + connection.on('error', function(err) {
  17 + logger.error('mongo connection error: %s', err.message || err)
  18 + })
17 19
18 20 connection.on('open', function() {
19 21 logger.info('mongo connection opened')
... ...
... ... @@ -8,7 +8,9 @@ exports = module.exports = function(logger, settings) {
8 8
9 9 var connection = new RedisStore(settings.redis)
10 10
11   - connection.on('error', logger.error)
  11 + connection.on('error', function(err) {
  12 + logger.error('redis connection error: %s', err.message || err)
  13 + })
12 14
13 15 connection.on('connect', function() {
14 16 logger.info('redis connected')
... ...
1 1 {
2 2 "name": "igloo",
3   - "version": "0.0.4-rc.7",
  3 + "version": "0.0.4-rc.8",
4 4 "description": "Igloo is a lightweight, fast, and minimal framework for rapid development",
5 5 "main": "./lib",
6 6 "repository": {
... ...
注册登录 后发表评论