Ruby on Rails Monday, June 27, 2011

On Mon, Jun 27, 2011 at 4:04 PM, giorgio <george.peverell@gmail.com> wrote:
> Basically I just want to see the Date and time on each line of the log.
>
> Surely it must be easy? I'm surprised its not default behaviour...

I am too, but ... :-)

For a 2.3.x app, I just overrode ActiveSupport::BufferedLogger#add
to put the timestamp at the beginning of the line. Still seems vaguely
hacky, but it works just fine.

HTH,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment