Ruby on Rails Friday, February 10, 2017

On Friday, February 10, 2017 at 1:05:57 PM UTC+1, Colin Law wrote:
On 10 February 2017 at 11:50, 'krfg' via Ruby on Rails: Talk
<rubyonra...@googlegroups.com> wrote:
>
> I would need information about logger.info
> When I try to open test.log Atom warns me that if it opens large files it
> might become unresponsive.
> Shall I take for granted that you are interested it test.log?

Whichever log is relevant at the time, so when running tests then yes
it is test.log.  You can use tail to watch the log while you run the
test
tail -f log/test.log
or you can use tail after the event just to show the last lines
tail -n 100 log/test.log

Also you can delete or empty the log file before running the test,
then it will only contain the latest information.

In fact I think logger.info outputs to the console too so you don't
need to look at the log. Not certain about that though.

Colin



Ok, thanks for the suggestion.
I will try to use tail if it works with such a heavy file, otherwise I would need instructions on how to empty the file.
The most important thing I have to understand is: where should I place logger.info?
In static_pages_controller.rb before the declaration of @atp_tournaments variable?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8e610b17-e854-45f2-ac4b-81574ac19532%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment