Method: DebugLogging::Configuration#initialize
- Defined in:
- lib/debug_logging/configuration.rb
#initialize(**options) ⇒ Configuration
Returns a new instance of Configuration.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/debug_logging/configuration.rb', line 54 def initialize(**) @enabled = .key?(:enabled) ? [:enabled] : true @logger = .key?(:logger) ? [:logger] : Logger.new($stdout) @log_level = .key?(:log_level) ? [:log_level] : :debug @multiple_last_hashes = .key?(:multiple_last_hashes) ? [:multiple_last_hashes] : false @last_hash_to_s_proc = .key?(:last_hash_to_s_proc) ? [:last_hash_to_s_proc] : nil @last_hash_max_length = .key?(:last_hash_max_length) ? [:last_hash_max_length] : 1_000 @args_max_length = .key?(:args_max_length) ? [:args_max_length] : 1_000 @instance_benchmarks = .key?(:instance_benchmarks) ? [:instance_benchmarks] : false @class_benchmarks = .key?(:class_benchmarks) ? [:class_benchmarks] : false @colorized_chain_for_method = .key?(:colorized_chain_for_method) ? [:colorized_chain_for_method] : false @colorized_chain_for_class = .key?(:colorized_chain_for_class) ? [:colorized_chain_for_class] : false @add_invocation_id = .key?(:add_invocation_id) ? [:add_invocation_id] : true @ellipsis = .key?(:ellipsis) ? [:ellipsis] : DEFAULT_ELLIPSIS @mark_scope_exit = .key?(:mark_scope_exit) ? [:mark_scope_exit] : false @methods_to_log = [] end |