From 7579b7009839beae606aec2cf4461546b252a3a2 Mon Sep 17 00:00:00 2001 From: Kanstantsin Kamkou Date: Wed, 23 Sep 2015 13:47:25 +0200 Subject: [PATCH] deflation removed --- README.md | 5 ++--- lib/adapter/tcp.js | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 582a4ef..e0ab11b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -48,7 +47,7 @@ log.info("Hello world"); ### Adapters - UDP (with deflation and chunking) -- TCP (with optional deflation) +- TCP ### Tests #### Cli diff --git a/lib/adapter/tcp.js b/lib/adapter/tcp.js index bdb6092..5a7ac1d 100644 --- a/lib/adapter/tcp.js +++ b/lib/adapter/tcp.js @@ -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));