well..

 To log a message from either a controller or a model, access the Rails 
logger instance with the logger method:

class HomeController < ActionController::Base
  def index
    logger.info 'informational message'
  end
end

>From outside a controller or model, you can pass the logger instance or 
access it with the constant RAILS_DEFAULT_LOGGER. Since Rails 2.1, you 
can also access it with the shortcut Rails.logger.



In an initializer file, Rails.logger is the best way to log ?

thanks
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to