lib/sapience/configuration.rb in sapience-2.7.0 vs lib/sapience/configuration.rb in sapience-2.8
- old
+ new
@@ -6,11 +6,11 @@
# rubocop:disable ClassVars
class Configuration
attr_reader :default_level, :backtrace_level, :backtrace_level_index
attr_writer :host
attr_accessor :app_name, :ap_options, :appenders, :log_executor, :filter_parameters,
- :metrics, :error_handler, :silent_active_record, :silent_rails
+ :metrics, :error_handler, :silent_active_record, :silent_rails, :silent_rack
SUPPORTED_EXECUTORS = %i(single_thread_executor immediate_executor).freeze
DEFAULT = {
log_level: :info,
host: nil,
@@ -20,29 +20,31 @@
metrics: { datadog: { url: Sapience::DEFAULT_STATSD_URL } },
error_handler: { silent: {} },
filter_parameters: %w(password password_confirmation),
silent_active_record: false,
silent_rails: false,
+ silent_rack: false,
}.freeze
# Initial default Level for all new instances of Sapience::Logger
def initialize(options = {}) # rubocop:disable AbcSize
fail ArgumentError, "options need to be a hash #{options.inspect}" unless options.is_a?(Hash)
@options = DEFAULT.merge(options.dup.deep_symbolize_keyz!)
@options[:log_executor] &&= @options[:log_executor].to_sym
validate_log_executor!(@options[:log_executor])
- self.default_level = @options[:log_level].to_sym
+ self.default_level = @options[:log_level].to_sym
self.backtrace_level = @options[:log_level].to_sym
self.host = @options[:host]
self.app_name = @options[:app_name]
self.ap_options = @options[:ap_options]
self.appenders = @options[:appenders]
self.log_executor = @options[:log_executor]
self.filter_parameters = @options[:filter_parameters]
self.metrics = @options[:metrics]
self.error_handler = @options[:error_handler]
self.silent_active_record = @options[:silent_active_record]
- self.silent_rails = @options[:silent_rails]
+ self.silent_rails = @options[:silent_rails]
+ self.silent_rack = @options[:silent_rack]
end
# Sets the global default log level
def default_level=(level)
@default_level = level