Custom format with BufferedLogger?


#1

So Rails2 provides a new BufferedLogger class that is used for logging.
The old monkey-patched Logger class is deprecated.

It’s nice that the new BufferedLogger doesn’t do that weird monkey
patching thing, making it easier to sub-class for custom behavior and
set your sub-class as the logger, etc.

But oddly, BufferedLogger is not a sub-class of the Ruby logger. It’s
its own thing. Which seems to provide no good way to set a custom format
for output log messages.

Anyone figured out a good way to use BufferedLogger (or a subclass), but
set your own format for output, like you can with the default ruby
Logger class?

I wonder why BufferedLogger wasn’t made a sub-class of Logger.

Jonathan