Forum: Ruby on Rails custom format with BufferedLogger?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jonathan R. (Guest)
on 2008-11-18 01:32
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
This topic is locked and can not be replied to.