I might be wrong, but the code below seems to be setting the Rails logger, 
which by default is not the ActiveRecord logger. Try adding the following:

ActiveRecord::Base.logger = Rails.logger


This will connect ActiveRecord logging to the Rails logger and your changes 
to the Rails logger will then apply to the ActiveRecord logger. 
 Alternatively, change your references to "logger" to 
"ActiveRecord::Base.logger".

Hope this helps.

Jack

On Wednesday, March 6, 2013 6:38:22 AM UTC-8, Dave wrote:
>
> Hi,
>
> I am using Active Record and have set the logging level to just show 
> errors using code like this:
>
> unless ActiveRecord::Base.connected?
>     logger = Logger.new(STDOUT)
>     logger.level = Logger::ERROR
>     ActiveRecord::Base.establish_connection 
> ActiveRecord::Base.configurations[:production]
>     ActiveRecord::Base.logger = logger
> end
>
>
> The problem is when I view my heroku logs, I am still seeing Active Record 
> DEBUG lines. How does on set Active Record to be "quiet" on heroku?
>
> Thanks
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to