123456789_123456789_123456789_123456789_123456789_

Class: ActiveSupport::Ractors::Logger

Do not use. This class is for internal use only.

Overview

A Ractor-shareable ::ActiveSupport::Logger.

#flush honors the ::Rails per-request contract: ::Rails::Rack::Logger calls LogSubscriber.flush_all!, which calls #flush on the logger to drain a request's logs before the next request is processed.

Class Attribute Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

::ActiveSupport::LoggerThreadSafeLevel - Inherited

#initialize, #initialize_copy, #level,
#log_at

Change the thread-local level for the duration of the given block.

::ActiveSupport::LoggerSilence - Included

#silence

Silences the logger for the duration of the block.

Constructor Details

.new(*args, level: ::Logger::DEBUG, progname: nil, formatter: nil, datetime_format: nil, **logdev_options) ⇒ Logger

[ GitHub ]

  
# File 'activesupport/lib/active_support/ractors/logger.rb', line 12

def initialize(*args, level: ::Logger::DEBUG, progname: nil, formatter: nil, datetime_format: nil, **logdev_options)
  super(nil, level: level, progname: progname, formatter: formatter, datetime_format: datetime_format)
  @logdev = DeviceProxy.new(*args, **logdev_options)
end

Instance Attribute Details

#flush (readonly)

[ GitHub ]

  
# File 'activesupport/lib/active_support/ractors/logger.rb', line 17

delegate :flush, to: :@logdev