title: How to get event details in middleware for socket.io
body: <p>I am trying to log the <code>event name</code> and <code>parameter</code> for each event on my Node server. For this purpose I used</p>
  
  <pre><code>io.use(function(socket, next){
    // how to get event name out of socket.
  });
  </code></pre>
  
  <p>Now, I got stuck while trying to get event name and arguments. To me, it looks like common demand from API dev, so I am pretty sure there must be some way to the library to get that, I have tried to read the docs and source but I am not able to get the stuff.</p>