senchalabs/connect — pull request #997 by Jammerwoch (2014-01-10 06:04:05+00:00)
Title: logger: added conditional logging via 'skip' function in options.

This came about because of this StackOverflow question: http://stackoverflow.com/questions/21030885. The OP wanted to be able to log conditionally based on the response status code. I chose to implement this by testing for the presense of a function called 'skip' in the options object. If that function is there, it is invoked with the request and response: if its result is truthy, the request is not logged. Simple and low-impact.