From 5f73c3cd51eb367b07c1a150092e6f8df3bdd759 Mon Sep 17 00:00:00 2001 From: Nate Smith Date: Wed, 23 Dec 2015 10:06:10 -0500 Subject: Document `Logger#broadcast_messages` option --- activesupport/lib/active_support/logger.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/logger.rb b/activesupport/lib/active_support/logger.rb index 82117a64d2..6f2ab310b9 100644 --- a/activesupport/lib/active_support/logger.rb +++ b/activesupport/lib/active_support/logger.rb @@ -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: -- cgit v1.2.3