Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Inconvenient Time stamp format in logger

#6071

The Rails logger in 3.0.3 was changed to put Time.now.to_default_s on every log action which produces something like "Fri Nov 26 15:17:39 +0100 2010". This is really inconvenient for scripts that automatically process logs.

I propose we change this to simply Time.now.to_s, that will have the same output but allows the user to set his own format in the config files with Time::DATE_FORMATS[:default] = "%Y-%m-%d %H:%M:%S"

(An alternative would be to use Time.now.to_s(:db) which is the more convenient Rails 2 format)

Reported by Fjan · November 26th, 2010 @ 02:38 PM

State: stale
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Neeraj Singh
    Neeraj Singh
    • Importance changed from to Low

    I will say leave the formatting the way it is so that fix won't break any existing app. However allow users to configure it.

    November 26th, 2010 @ 03:50 PM

  2. Fjan
    Fjan

    I agree. That still leaves us with the choice to leave it the way it was in Rails 2 or to leave it the way it is now in Rails 3. The latter allows us to more easily make it user configurable so that's probably preferred.

    November 26th, 2010 @ 03:55 PM

  3. rails
    rails
    • State changed from new to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    March 1st, 2011 @ 12:00 AM

  4. rails
    rails
    • State changed from open to stale

    March 1st, 2011 @ 12:00 AM

  5. bingbing