title: How do I enable logging in Rails?
body: <p>I'm a Ruby/Rails newbie, but not a development newbie.</p>
  
  <p>I have the following code defined in iniatializer.rb:</p>
  
  <pre><code>def logger
    if defined?(RAILS_DEFAULT_LOGGER)
      RAILS_DEFAULT_LOGGER
    else
      nil
    end
  end
  </code></pre>
  
  <p>I want to enable logging of messages in my Ruby/Rails application.</p>
  
  <p>And in some Ruby/Rails code, I have</p>
  
  <pre><code>  logger.info "Email attachment: #{size} #{filename}"
  </code></pre>
  
  <p>\ruby\bin>ruby --version gives:
  ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]</p>
  
  <p>How would I change the logger definition so that logger.info goes into a file that I can open up and read? Please include necessary require/include as well.</p>
  
  <p>Thank you.</p>