Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The motivation here is to fix a Rails issue caused by the way ActiveSupport extends the ruby Logger to add broadcasting of messages to multiple destinations. [1] I believe the problem could be much more elegantly solved if Logger exposed the underlying LogDevice. Going by repo history, the existence of this object hasn't changed since 2003, so I think it's stable enough to expose. In addition to letting you read the logdev, this also lets you pass a logdev in. To implement broadcasting, we could now define a LogDevice subclass that delegates its 3 methods to the LogDevices of a list of underlying loggers, and simply create a new logger with this device. [1]: https://github.com/rails/rails/blob/ba19dbc49956a73f417abd68c7a5f33e302eacd3/activesupport/lib/active_support/logger.rb#L23
- Loading branch information