Skip to content

Commit e0c9dde

Browse files
committed
[breaking] Removed winston.transports.Webhook.
1 parent fb9eec0 commit e0c9dde

File tree

10 files changed

+12
-311
lines changed

10 files changed

+12
-311
lines changed

.npmignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ test/*.log
22
test/fixtures/*.json
33
test/fixtures/logs/*.log*
44
test/fixtures/keys/
5-
test/transports/webhook-test.js
65
node_modules/
76
node_modules/*
87
npm-debug.log

examples/couchdb.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var winston = require('../lib/winston');
55
//
66
//
77
// The Console transport will simply output to the console screen
8-
// The Couchdb tranport will perform an HTTP POST request to the specified CouchDB instance
8+
// The CouchDB tranport will perform an HTTP POST request to the specified CouchDB instance
99
//
1010
var logger = new (winston.Logger)({
1111
transports: [
@@ -15,4 +15,4 @@ var logger = new (winston.Logger)({
1515
]
1616
});
1717

18-
logger.log('info', 'Hello webhook log files!', { 'foo': 'bar' });
18+
logger.log('info', 'Hello log files!', { 'foo': 'bar' });

examples/webhook-post.js

-17
This file was deleted.

lib/winston/transports/webhook.js

-146
This file was deleted.

test/container-test.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ vows.describe('winston/container').addBatch({
5959
topic: function () {
6060
this.port = 9412;
6161
this.transports = [
62-
new winston.transports.Webhook({
62+
new winston.transports.Http({
6363
port: this.port
6464
})
6565
];
66-
66+
6767
this.container = new winston.Container({
6868
transports: this.transports
6969
});
70-
70+
7171
return null;
7272
},
7373
"the get() method": {
@@ -81,19 +81,19 @@ vows.describe('winston/container').addBatch({
8181
"should add the logger correctly": function () {
8282
this.someLogger = this.container.get('some-logger');
8383
assert.isObject(this.someLogger.transports);
84-
assert.instanceOf(this.someLogger.transports['webhook'], winston.transports.Webhook);
85-
assert.strictEqual(this.someLogger.transports['webhook'], this.transports[0]);
84+
assert.instanceOf(this.someLogger.transports['http'], winston.transports.Http);
85+
assert.strictEqual(this.someLogger.transports['http'], this.transports[0]);
8686
},
8787
"a second call to get()": {
8888
"should respond with the same transport object": function () {
8989
this.someOtherLogger = this.container.get('some-other-logger');
9090

9191
assert.isObject(this.someOtherLogger.transports);
92-
assert.instanceOf(this.someOtherLogger.transports['webhook'], winston.transports.Webhook);
93-
assert.strictEqual(this.someOtherLogger.transports['webhook'], this.transports[0]);
94-
assert.strictEqual(this.someOtherLogger.transports['webhook'], this.someLogger.transports['webhook']);
92+
assert.instanceOf(this.someOtherLogger.transports['http'], winston.transports.Http);
93+
assert.strictEqual(this.someOtherLogger.transports['http'], this.transports[0]);
94+
assert.strictEqual(this.someOtherLogger.transports['http'], this.someLogger.transports['http']);
9595
}
9696
}
9797
}
9898
}
99-
}).export(module);
99+
}).export(module);

test/helpers.js

-5
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ helpers.assertDailyRotateFile = function (transport) {
9494
assert.isFunction(transport.log);
9595
}
9696

97-
helpers.assertWebhook = function (transport) {
98-
assert.instanceOf(transport, winston.transports.Webhook);
99-
assert.isFunction(transport.log);
100-
};
101-
10297
helpers.assertCouchdb = function (transport) {
10398
assert.instanceOf(transport, winston.transports.Couchdb);
10499
assert.isFunction(transport.log);

test/logger-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ vows.describe('winton/logger').addBatch({
211211
},
212212
"the remove() with an unadded transport": {
213213
"should throw an Error": function (logger) {
214-
assert.throws(function () { logger.remove(winston.transports.Webhook) }, Error);
214+
assert.throws(function () { logger.remove(winston.transports.Http) }, Error);
215215
}
216216
},
217217
"the remove() method with an added transport": {

test/transports/transport.js

-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ module.exports = function (transport, options) {
3131
case 'file':
3232
helpers.assertFile(transport);
3333
break;
34-
case 'webhook':
35-
helpers.assertWebhook(transport);
36-
break;
3734
case 'couchdb':
3835
helpers.assertCouchdb(transport);
3936
break;

test/transports/webhook-test.js

-125
This file was deleted.

0 commit comments

Comments
 (0)