Skip to content

Commit

Permalink
Merge pull request rails#22771 from nwjsmith/document-broadcast-messages
Browse files Browse the repository at this point in the history
Document `Logger#broadcast_messages` option
  • Loading branch information
eileencodes committed Dec 27, 2015
2 parents 58a6a24 + 5f73c3c commit a13032c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion activesupport/lib/active_support/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a13032c

Please sign in to comment.