etsy/statsd — pull request #118 by till (2012-07-11 18:28:33+00:00)
Title: Logging to syslog

Here is my attempt to log to syslog.

This pull request introduces a new logger module which by default uses nodejs' util module to log messages to stdout but also allows for logging to syslog. Along come a couple new configuration options in the configuration file which are primarily syslog related. Under the hood it uses `node-syslog` to talk to syslog.

I'm not really happy with how I expose [the option flags (for openlog), log levels and the facilities](https://github.com/schamane/node-syslog/blob/master/node-syslog.js#L16-L55) in the configuration file. But maybe that's not even necessary.

For the log level, I've used (brace yourself) `eval()` to make it work, but I'm almost sure there has to be a better way to achieve this.

https://github.com/easybib/statsd/blob/logger/lib/logger.js#L25-L30

Thanks for your time,
Till