aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@gmail.com>2015-12-27 09:59:58 -0500
committerEileen M. Uchitelle <eileencodes@gmail.com>2015-12-27 09:59:58 -0500
commita13032cab141c3faa99702a1de904192d99a07ea (patch)
tree4823b1403357a7d857bb9a733d670d29bb527886 /activesupport
parent58a6a246cc8e78e15d083df041aea54d61a6b62a (diff)
parent5f73c3cd51eb367b07c1a150092e6f8df3bdd759 (diff)
downloadrails-a13032cab141c3faa99702a1de904192d99a07ea.tar.gz
rails-a13032cab141c3faa99702a1de904192d99a07ea.tar.bz2
rails-a13032cab141c3faa99702a1de904192d99a07ea.zip
Merge pull request #22771 from nwjsmith/document-broadcast-messages
Document `Logger#broadcast_messages` option
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/logger.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/logger.rb b/activesupport/lib/active_support/logger.rb
index 520268b244..cd002b3544 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: