Module: Dry::Logger::Backends::Core

Included in:
Proxy, Stream
Defined in:
lib/dry/logger/backends/core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#log_ifObject

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.

Return a proc used by the log? predicate

Since:

  • 1.0.0



13
14
15
# File 'lib/dry/logger/backends/core.rb', line 13

def log_if
  @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.

Returns:

  • (Boolean)

Since:

  • 1.0.0



28
29
30
31
32
33
34
# File 'lib/dry/logger/backends/core.rb', line 28

def log?(entry)
  if log_if
    log_if.call(entry)
  else
    true
  end
end