I'm a Ruby/Rails newbie, but not a development newbie.
I have the following code defined in iniatializer.rb:
def logger
if defined?(RAILS_DEFAULT_LOGGER)
RAILS_DEFAULT_LOGGER
else
nil
end
end
I want to enable logging of messages in my Ruby/Rails application.
And in some Ruby/Rails code, I have
logger.info "Email attachment: #{size} #{filename}"
\ruby\bin>ruby --version gives: ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]
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.
Thank you.