提交 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 | 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') | ... | ... |
请
注册
或
登录
后发表评论