How do I turn off logging in Rails 3?

Posted by Jason Noble on 05/22/2012 in Uncategorized |

I have a script I want to run in rails console, but I don’t want to log the SQL and such. So I googled how to turn off all logging in Rails 3 console. Unfortunately, all the answers were old, so here’s how I did it:

[ruby]
Logging.logger.root.level = ‘off’
[/ruby]

Copyright © 2008-2024 Jason Noble's Technical Adventures All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.