redding/sanford — pull request #27 by jcredding (2012-12-10 16:44:55+00:00)
Title: Added summary logging option for hosts

This adds a `verbose_logging` option that can be switched on and off. When on (the default) it will do the logging we currently have, this looks like:

```
Received request
Version: "v1"
Service: "echo"
Parameters: {"message"=>"test"}
Handler: "DummyHost::Echo"
Completed in 1.57ms [200, OK]
```

When verbose logging is turned off, you get:

```
version=v1 name=echo params={"message"=>"test"} status=200 duration=1.03
```

As far as implementation goes, I chose to create wrapper classes to avoid a bunch of conditionals. The summary logging adds almost no overhead as it is done after a response has already been written. I ran the benchmarking with summary logging on and it was comparable to having logging turned off.

Addresses #26