1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #22771 from nwjsmith/document-broadcast-messages

Document `Logger#broadcast_messages` option
This commit is contained in:
Eileen M. Uchitelle 2015-12-27 09:59:58 -05:00
commit a13032cab1

View file

@ -5,7 +5,15 @@ module ActiveSupport
class Logger < ::Logger
include LoggerSilence
attr_accessor :broadcast_messages
# If +true+, will broadcast all messages sent to this logger to the any
# logger linked to this one via +broadcast+.
#
# If +false+, the logger will still forward calls to +close+, +progname=+,
# +formatter=+ and +level+ to any linked loggers, but no calls to +add+ or
# +<<+.
#
# Defaults to +true+.
attr_accessor :broadcast_messages # :nodoc:
# Broadcasts logs to multiple loggers.
def self.broadcast(logger) # :nodoc: