socketstream/socketstream — pull request #430 by evanlh (2014-02-03 22:19:44+00:00)
Title: Pluggable logging in ss.api

This pull request adds loglevels to ss.api and replaces server-side calls to console.log with the appropriate loglevel call. I used https://github.com/socketstream/socketstream/issues/380 as a reference point-- the main difficulties I encountered were refactoring sessions, magicpath and a few others to take ss as a require parameter. Calls to ss.api.log will be prepended with a "FIXME" to notify plugin authors this call has been deprecated.

To use winston logging simply:
```
var ss = require("socketstream"),
winston = require('winston');
ss.api.log.info = winston.info;
ss.api.log.debug = winston.info;
ss.api.log.error = winston.error;
ss.api.log.warn = winston.warn;
```

Please let me know how this looks and anything else I can do, would love to get this approved!