title: winston http transport example
body: <p>I need a working example which post the logs on server using http transport. I'm able to use <strong>file</strong> transport and <strong>console</strong> transport to log message in file and on console. Same way I tried doing for <strong>http</strong> transport also, the source cod for winston clien looks something like this :</p>
  
  <pre><code>var winston = require('winston');
  
  var logger = new (winston.Logger)({
  transports: [
    new (winston.transports.Console)(),
    new (winston.transports.Http)({ host: 'localhost', port:8080 })
  ]
    });
  
  logger.log('info', 'Hello world');
  </code></pre>
  
  <p>While runnign this code I get error like : </p>
  
  <pre><code>D:\Balwant\Devlopment-Env\LoggingDemo\node_modules\winston\lib\winston\transports\http.js:52
  req = (self.ssl ? https : http).request({
       ^
  ReferenceError: self is not defined
  at Http._request (D:\Balwant\Devlopment-    Env\LoggingDemo\node_modules\winston\lib\winston\transports\http.js:52:10)
  at Http.log (D:\Balwant\Devlopment-Env\LoggingDemo\node_modules\winston\lib\winston\transports\http.js:109:8)
  at emit (D:\Balwant\Devlopment-Env\LoggingDemo\node_modules\winston\lib\winston\logger.js:175:17)
  at D:\Balwant\Devlopment-Env\LoggingDemo\node_modules\winston\node_modules\async\lib\async.js:111:13
  at Array.forEach (native)
  at _each (D:\Balwant\Devlopment-Env\LoggingDemo\node_modules\winston\node_modules\async\lib\async.js:32:24)
  at Object.async.each (D:\Balwant\Devlopment-Env\LoggingDemo\node_modules\winston\node_modules\async\lib\async.js:110:9)
  at Logger.log (D:\Balwant\Devlopment-Env\LoggingDemo\node_modules\winston\lib\winston\logger.js:203:9)
  at Object.&lt;anonymous&gt; (D:\Balwant\Devlopment-Env\LoggingDemo\logger.js:10:8)
  at Module._compile (module.js:456:26)
  </code></pre>
  
  <p>Since I'm new to node.js, I've no idea how to deal with it. I tried googling for solution but could not get any. 
  Plese help me. </p>
  
  <p>Thanks</p>