提交 740d52a1f8be22a178cc149ea2d140c61bd475d0
1 个父辈
a22b259f
Fixed handling of error output on redis/mongo connection failures
正在显示
3 个修改的文件
包含
7 行增加
和
3 行删除
| @@ -13,7 +13,9 @@ exports = module.exports = function(logger, settings) { | @@ -13,7 +13,9 @@ exports = module.exports = function(logger, settings) { | ||
| 13 | settings.mongo.opts | 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 | connection.on('open', function() { | 20 | connection.on('open', function() { |
| 19 | logger.info('mongo connection opened') | 21 | logger.info('mongo connection opened') |
| @@ -8,7 +8,9 @@ exports = module.exports = function(logger, settings) { | @@ -8,7 +8,9 @@ exports = module.exports = function(logger, settings) { | ||
| 8 | 8 | ||
| 9 | var connection = new RedisStore(settings.redis) | 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 | connection.on('connect', function() { | 15 | connection.on('connect', function() { |
| 14 | logger.info('redis connected') | 16 | logger.info('redis connected') |
| 1 | { | 1 | { |
| 2 | "name": "igloo", | 2 | "name": "igloo", |
| 3 | - "version": "0.0.4-rc.7", | 3 | + "version": "0.0.4-rc.8", |
| 4 | "description": "Igloo is a lightweight, fast, and minimal framework for rapid development", | 4 | "description": "Igloo is a lightweight, fast, and minimal framework for rapid development", |
| 5 | "main": "./lib", | 5 | "main": "./lib", |
| 6 | "repository": { | 6 | "repository": { |
请
注册
或
登录
后发表评论