Skip to content

Commit

Permalink
deflation removed
Browse files Browse the repository at this point in the history
  • Loading branch information
kkamkou committed Sep 23, 2015
1 parent 27bf1ac commit 7579b70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ var log = require('gelf-pro');
### Configuration
```javascript
log.setConfig({
fields: {facility: "example", owner: "Tom (a cat)"},
fields: {facility: "example", owner: "Tom (a cat)"}, // default fields for all messages
adapterName: 'udp', // currently supported "udp" and "tcp"
adapterOptions: {
protocol: 'udp4', // udp only. udp adapter: udp4, udp6
deflate: true, // tcp only, optional. Enables zlib compression. Defaults to false.
family: 4, // tcp only, optional. Version of IP stack. Defaults to 4.
host: '127.0.0.1',
port: 12201
Expand All @@ -48,7 +47,7 @@ log.info("Hello world");
### Adapters

- UDP (with deflation and chunking)
- TCP (with optional deflation)
- TCP

### Tests
#### Cli
Expand Down
6 changes: 2 additions & 4 deletions lib/adapter/tcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ tcp.send = function (message, callback) {
});
},
function (cb) {
if (!self.options.deflate) {
return cb(null, new Buffer(message));
}
self.deflate(message, cb);
// @todo! 1h add deflation with GELF 2.0
cb(null, new Buffer(message));
},
function (buffer, cb) {
var packet = new Buffer(Array.prototype.slice.call(buffer, 0, buffer.length).concat(0x00));
Expand Down

0 comments on commit 7579b70

Please sign in to comment.