Timestamps on log files

Hello people,
I’m currently reading the innards of Arel and ActiveRecord and
thought of modifying the
ActiveSupport::BufferedLogger to automatically prepend a timestamp
on each log entry.
Would be very useful for a project I’m currently developing.

I’m going to make it a configurable option in applications.rb,
something like:

config.logger.timestamps => true

Is there any interest in having this in the rails core?
If it is, I could easily submit a patch. I have contributed to
ActiveRecord in the past.[1]

Let me know what you think.

Regards,
Sebastian.

1:

On Thu, Jul 22, 2010 at 7:32 PM, Sebastian A. Espindola
[email protected] wrote:

thought of modifying the
ActiveSupport::BufferedLogger to automatically prepend a timestamp
on each log entry.

+1 – I did that once myself for a project, but it was hard-wired.

I’m going to make it a configurable option in applications.rb …

Configurable sounds good :slight_smile:

Is there any interest in having this in the rails core?

I’d like to see it added.


Hassan S. ------------------------ [email protected]
twitter: @hassan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs