提交 f0e6c45fb118052a266236fb3c49f5c490210155

作者 Nick Baugh
1 个父辈 aff6aefe

added slack to winston

正在显示 2 个修改的文件 包含 8 行增加1 行删除
... ... @@ -6,6 +6,7 @@ var mergeDefaults = require('merge-defaults')
6 6 var winston = require('winston')
7 7 var winstonMongoDB = require('winston-mongodb')
8 8 var winstonHipchat = require('winston-hipchat')
  9 +var winstonSlack = require('winston-slack')
9 10
10 11 exports = module.exports = function(settings) {
11 12
... ... @@ -49,6 +50,11 @@ exports = module.exports = function(settings) {
49 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 58 var logger = new winston.Logger({
53 59 transports: transports
54 60 })
... ...
... ... @@ -41,7 +41,8 @@
41 41 "update-notifier": "^0.2.0",
42 42 "winston": "git://github.com/niftylettuce/winston",
43 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 47 "devDependencies": {
47 48 "chai": "^1.9.1",
... ...
注册登录 后发表评论