Class: WordsApi::LoggingConfiguration
- Inherits:
-
CoreLibrary::ApiLoggingConfiguration
- Object
- CoreLibrary::ApiLoggingConfiguration
- WordsApi::LoggingConfiguration
- Defined in:
- lib/words_api/logging/configuration/api_logging_configuration.rb
Overview
Initializes a new instance of LoggingConfiguration.
Instance Method Summary collapse
- #clone_with(logger: nil, log_level: nil, mask_sensitive_headers: nil, request_logging_config: nil, response_logging_config: nil) ⇒ Object
-
#initialize(logger: nil, log_level: nil, mask_sensitive_headers: true, request_logging_config: nil, response_logging_config: nil) ⇒ LoggingConfiguration
constructor
A new instance of LoggingConfiguration.
Constructor Details
#initialize(logger: nil, log_level: nil, mask_sensitive_headers: true, request_logging_config: nil, response_logging_config: nil) ⇒ LoggingConfiguration
Returns a new instance of LoggingConfiguration.
86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/words_api/logging/configuration/api_logging_configuration.rb', line 86 def initialize(logger: nil, log_level: nil, mask_sensitive_headers: true, request_logging_config: nil, response_logging_config: nil) request_logging_config ||= RequestLoggingConfiguration.new response_logging_config ||= ResponseLoggingConfiguration.new super( logger, log_level, request_logging_config, response_logging_config, mask_sensitive_headers ) end |
Instance Method Details
#clone_with(logger: nil, log_level: nil, mask_sensitive_headers: nil, request_logging_config: nil, response_logging_config: nil) ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/words_api/logging/configuration/api_logging_configuration.rb', line 100 def clone_with(logger: nil, log_level: nil, mask_sensitive_headers: nil, request_logging_config: nil, response_logging_config: nil) logger ||= self.logger log_level ||= self.log_level mask_sensitive_headers = self.mask_sensitive_headers ||= mask_sensitive_headers request_logging_config ||= self.request_logging_config.clone response_logging_config ||= self.response_logging_config.clone LoggingConfiguration.new(logger: logger, log_level: log_level, mask_sensitive_headers: mask_sensitive_headers, request_logging_config: request_logging_config, response_logging_config: response_logging_config) end |