title: Disable Rails SQL logging in console
body: <p>Is there a way to disable SQL query logging when I'm executing commands in the console? Ideally, it would be great if I can just disable it and re-enable it with a command in the console.</p>
  
  <p>I'm trying to debug something and using "puts" to print out some relevant data. However, the sql query output is making it hard to read.</p>
  
  <hr>
  
  <p><strong>Edit:</strong>
  I found another solution, since setting the logger to nil sometimes raised an error, if something other than my code tried to call logger.warn</p>
  
  <p>Instead of setting the logger to <code>nil</code> you can set the level of the logger to <code>1</code>.</p>
  
  <pre><code>ActiveRecord::Base.logger.level = 1 # or Logger::INFO
  </code></pre>