On Mar 31, 4:02 am, Zhao Yi <rails-mailing-l...@andreas-s.net> wrote:
> > Hi, you should be able to configure the log_path by adding it to the
> > initializer block in your environment.rb. For example,
>
> > Rails::Initializer.run do |config|
>
> > ...
>
> > # Note: By default, the log_path is set to log/#{environment}.log
> > config.log_path = <some_absolute_file_path>
>
> > end
>
> This log is rails log. What I want is application log. For example, in
> my controller, I use puts to print message to the console, I will to log
> this output.
Don't use puts, use Rails.logger.info (or whatever log level you
want). Or you can create and pass around your own logger object but
why bother ?
Fred
> --
> Posted viahttp://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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---