Class: ActiveSupport::Ractors::Logger
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Namespace Children | |
|
Classes:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
::ActiveSupport::Autoload,
::ActiveSupport::Logger,
Logger
|
|
|
Instance Chain:
|
|
| Inherits: |
ActiveSupport::Logger
|
| Defined in: | activesupport/lib/active_support/ractors/logger.rb, activesupport/lib/active_support/ractors/logger/device_proxy.rb, activesupport/lib/active_support/ractors/logger/writer.rb |
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
::ActiveSupport::Logger - Inherited
Class Method Summary
::ActiveSupport::Autoload - Extended
::ActiveSupport::Logger - Inherited
| .logger_outputs_to? | Returns true if the logger destination matches one of the sources. |
| .new, .normalize_sources | |
Instance Attribute Summary
- #flush readonly
::ActiveSupport::Logger - Inherited
::ActiveSupport::LoggerThreadSafeLevel - Inherited
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
# File 'activesupport/lib/active_support/ractors/logger.rb', line 12
def initialize(*args, level: ::Logger::DEBUG, progname: nil, formatter: nil, datetime_format: nil, **) super(nil, level: level, progname: progname, formatter: formatter, datetime_format: datetime_format) @logdev = DeviceProxy.new(*args, **) end
Instance Attribute Details
#flush (readonly)
[ GitHub ]# File 'activesupport/lib/active_support/ractors/logger.rb', line 17
delegate :flush, to: :@logdev