正在显示
2 个修改的文件
包含
8 行增加
和
1 行删除
@@ -6,6 +6,7 @@ var mergeDefaults = require('merge-defaults') | @@ -6,6 +6,7 @@ var mergeDefaults = require('merge-defaults') | ||
6 | var winston = require('winston') | 6 | var winston = require('winston') |
7 | var winstonMongoDB = require('winston-mongodb') | 7 | var winstonMongoDB = require('winston-mongodb') |
8 | var winstonHipchat = require('winston-hipchat') | 8 | var winstonHipchat = require('winston-hipchat') |
9 | +var winstonSlack = require('winston-slack') | ||
9 | 10 | ||
10 | exports = module.exports = function(settings) { | 11 | exports = module.exports = function(settings) { |
11 | 12 | ||
@@ -49,6 +50,11 @@ exports = module.exports = function(settings) { | @@ -49,6 +50,11 @@ exports = module.exports = function(settings) { | ||
49 | new winstonHipchat.Hipchat(settings.hipchat) | 50 | new winstonHipchat.Hipchat(settings.hipchat) |
50 | ) | 51 | ) |
51 | 52 | ||
53 | + if (settings.logger.slack) | ||
54 | + transports.push( | ||
55 | + new winstonSlack.Slack(settings.slack) | ||
56 | + ) | ||
57 | + | ||
52 | var logger = new winston.Logger({ | 58 | var logger = new winston.Logger({ |
53 | transports: transports | 59 | transports: transports |
54 | }) | 60 | }) |
@@ -41,7 +41,8 @@ | @@ -41,7 +41,8 @@ | ||
41 | "update-notifier": "^0.2.0", | 41 | "update-notifier": "^0.2.0", |
42 | "winston": "git://github.com/niftylettuce/winston", | 42 | "winston": "git://github.com/niftylettuce/winston", |
43 | "winston-hipchat": "^0.1.1", | 43 | "winston-hipchat": "^0.1.1", |
44 | - "winston-mongodb": "~0.4.3" | 44 | + "winston-mongodb": "~0.4.3", |
45 | + "winston-slack": "^0.1.6" | ||
45 | }, | 46 | }, |
46 | "devDependencies": { | 47 | "devDependencies": { |
47 | "chai": "^1.9.1", | 48 | "chai": "^1.9.1", |
请
注册
或
登录
后发表评论