cequel/cequel — pull request #70 by outoftime (2014-03-16 14:47:44+00:00)
Title: Logging calls not compatible with log4r.

While I appreciate that the docs for Cequel::Metal::Logger#out clearly state that it requires an instance of Logger from the standard library, the railtie passes in `Rails.logger` as the logger, which is not guaranteed to be a logger from stdlib. In my case, I use log4r to get a much richer logger and this propagates through out all of the Rails logging system.

As it turns out, the stdlib logger and log4r logger have different definitions of the `add` method. Calling `info`, `debug`, `warn`, etc. do appear to be API-compatible. But since cequel calls the generic `add` method, a conflict is induced.

My workaround for now is to undo the work the rail tie does by creating a new logger to use after the fact. On a side note, this was a bit hard to track down because there's no direct way to fetch the logger once set on the connection.