Class: Dry::Logger::Formatters::Rack Private

Inherits:
String show all
Defined in:
lib/dry/logger/formatters/rack.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.

Special handling of ‘:params` in the log entry payload

See Also:

Since:

  • 1.0.0

Constant Summary

Constants inherited from String

String::DEFAULT_SEVERITY_COLORS, String::EXCEPTION_SEPARATOR, String::HASH_SEPARATOR

Constants inherited from Structured

Structured::DEFAULT_FILTERS, Structured::NOOP_FILTER

Instance Attribute Summary

Attributes inherited from String

#template

Attributes inherited from Structured

#filter, #options

Instance Method Summary collapse

Methods inherited from String

#colorize?

Methods inherited from Structured

#call, #format, #format_values

Constructor Details

#initialize(**options) ⇒ Rack

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 Rack.

See Also:

Since:

  • 1.0.0



18
19
20
21
# File 'lib/dry/logger/formatters/rack.rb', line 18

def initialize(**options)
  super
  @template = Template[Logger.templates[:rack]]
end

Instance Method Details

#format_params(value) ⇒ Object

Since:

  • 1.0.0



25
26
27
# File 'lib/dry/logger/formatters/rack.rb', line 25

def format_params(value)
  return value unless value.empty?
end