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
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
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: