with_loggin extend to ActiveRecord::Relation with logging function.