title: How do I log Socket.io through Winston?
body: <p>I would like to use Winston as logger for Socket.io. I have seen <a href="https://github.com/LearnBoost/socket.io/issues/800" rel="noreferrer">this issue</a> where it says:</p>
  
  <pre><code>var io = require('socket.io').listen(8080);
  io.set('logger', { debug: &lt;log function&gt;, info: … , error: .., warn: .. })
  </code></pre>
  
  <p>Unfortunately, it is not described what the <code>log function</code> should look like.</p>
  
  <p>Some playing around and a look into the <a href="https://github.com/LearnBoost/Socket.IO/blob/0.9.14/lib/logger.js" rel="noreferrer">Socket.io logger documentation</a> told me that there is no fixed set of parameters: There are log messages with one, two and three parameters. Perhaps there are even more, I don't know.</p>
  
  <p>I think that this is definitely not a good practice to have an undefined number of parameters, especially if this is your interface to external components.</p>
  
  <p>Anyway ... does anybody have some experience with this? Can anyone point out what to watch out for?</p>