I understand that rails 2.x introduced the buffered logger for performance and this is great. It also removed, as far as I can tell, the formatting that was available in the previous logger. Has anyone endeavored to include a formatter with the new logger? Or have any recommendations. Many thanks. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bumping this .... Was it not included for performance reasons or just not included yet? DHH makes reference to removing it in the changeset but doesn''t say why: http://dev.rubyonrails.org/changeset/7626 On Jan 10, 9:47 pm, nootch <noah....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I understand that rails 2.x introduced the buffered logger for > performance and this is great. It also removed, as far as I can tell, > the formatting that was available in the previous logger. Has anyone > endeavored to include a formatter with the new logger? Or have any > recommendations. > > Many thanks.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Guess I can''t say I''m surprised there''s not a lot of
interest in the
exciting topic of logging.
I ended up creating a super class "FormattedBufferedLogger" and
initializing it in each of the environment files. The
FormattedBufferedLogger (which rolls off the tongue I know), overrides
#add to do some formatting magic and then calls #super
Note that config.logger didn''t work at all. I had to redefine the
RAILS_DEFAULT_LOGGER constant. Like so:
RAILS_DEFAULT_LOGGER
ExcitingModule::FormattedBufferedLogger.new(File.join(RAILS_ROOT,
"log", "#{RAILS_ENV}.log"),
ActiveSupport::BufferedLogger::Severity::DEBUG)
On Jan 11, 5:02 pm, nootch
<noah....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Bumping this ....
>
> Was it not included for performance reasons or just not included yet?
> DHH makes reference to removing it in the changeset but doesn''t
say
> why:
>
> http://dev.rubyonrails.org/changeset/7626
>
> On Jan 10, 9:47 pm, nootch
<noah....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > I understand that rails 2.x introduced the buffered logger for
> > performance and this is great. It also removed, as far as I can tell,
> > the formatting that was available in the previous logger. Has anyone
> > endeavored to include a formatter with the new logger? Or have any
> > recommendations.
>
> > Many thanks.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---