roidrage/lograge — pull request #39 by jpslav (2013-07-03 02:18:11+00:00)
Title: Adds ability to skip logging for events meeting configured criteria

In the spirit of further simplifying and reducing unimportant log information, this PR adds the ability to ignore log events that meet certain configured criteria. Users can specify certain controller actions for which log messages should not be generated. Users can also specify custom lambdas that inspect log events to determine whether or not they should be logged. The PR design leaves open the ability to add other kinds of canned `ignore_*` statements, such as `ignore_ip`, etc.

These changes were motivated by the desire to suppress log messages generated by services that check the health of a web server. Logging a GET request for a status/health page every minute of every day was not desirable to me.

Tests and README changes are included. Note that I had to change line 18 of `lib/lograge/log_subscriber.rb`; if I left it how it was, all of the specs failed. Don't know if others had seen that problem before.