Class: Dry::Logger::Backends::Proxy Private
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Dry::Logger::Backends::Proxy
- Includes:
- Core
- Defined in:
- lib/dry/logger/backends/proxy.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Logger proxy is used for regular loggers that don’t work with log entries
Instance Attribute Summary
Attributes included from Core
Instance Method Summary collapse
-
#initialize(backend, **options) ⇒ Proxy
constructor
private
A new instance of Proxy.
- #log?(entry) ⇒ Boolean private
Constructor Details
#initialize(backend, **options) ⇒ Proxy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Proxy.
40 41 42 43 44 |
# File 'lib/dry/logger/backends/proxy.rb', line 40 def initialize(backend, **) super(backend) @options = self.log_if = @options[:log_if] end |
Instance Method Details
#log?(entry) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
48 49 50 51 52 53 54 |
# File 'lib/dry/logger/backends/proxy.rb', line 48 def log?(entry) if log_if log_if.call(entry) else true end end |