Method: CoreLibrary::BaseHttpLoggingConfiguration#initialize

Defined in:
lib/apimatic-core/logger/configurations/api_logging_configuration.rb

#initialize(log_body, log_headers, headers_to_exclude, headers_to_include, headers_to_unmask) ⇒ BaseHttpLoggingConfiguration

Initializes a new instance of BaseHttpLoggingConfiguration.

Parameters:

  • log_body (Boolean)

    Indicates whether the message body should be logged. Default is false.

  • log_headers (Boolean)

    Indicates whether the message headers should be logged. Default is false.

  • headers_to_exclude (Array<String>)

    Array of headers not displayed in logging. Default is an empty array.

  • headers_to_include (Array<String>)

    Array of headers to be displayed in logging. Default is an empty array.

  • headers_to_unmask (Array<String>)

    Array of headers which values are non-sensitive to display in logging. Default is an empty array.



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/apimatic-core/logger/configurations/api_logging_configuration.rb', line 40

def initialize(
  log_body,
  log_headers,
  headers_to_exclude,
  headers_to_include,
  headers_to_unmask
)
  @log_body = log_body
  @log_headers = log_headers
  @headers_to_exclude = headers_to_exclude || []
  @headers_to_include = headers_to_include || []
  @headers_to_unmask = headers_to_unmask || []
end