Update the ActiveRecord query logging to use custom log method

Instead of realying on a method named log(), you can now use a
custom log method name, or default 'log'.