code: function pushToStash(config, msg) {
          var client = net.connect({host: config.host, port: config.port}, function () {
              client.write(msg);
              client.end();
          });
          //Fail silently
          client.on('error', function (evt) {
              if (true === config.debug) {
                  console.log('An error happened in the logstash appender!', evt);
              }
          });
      }
docs: Setup the connection to logstash