NarrativeScience/Log.io — pull request #71 by parkerd (2013-05-19 21:03:14+00:00)
Title: Fix and improve server/harvester logging

First, thanks for the great app. Started playing with Log.io yesterday and once I got things running it was excellent. Works very well with our existing Logstash setup to provide a realtime view of events.

It did take me some time to get it going though, which wasn't helped by the logging of Log.io itself being more or less broken (for me at least). I've tried to fix a few things:

- Extracted logger to a util file to reduce repetition between server/harvester
- Allowed logging to be overridden by the config as it seems was originally intended (this was broken by the scripts in /bin)
- Fixed winston's broken default log levels
- Added 'log_level' option to the config for cases where don't want to replace the whole logger
- Set socket.io to use the same logger as the web server

I'm decent at JS but still learning, and entirely new to Coffee, so if I've made any major mistakes let me know. Have a few other patches I'll submit later for bugs I've hit since getting the logging visible.