Module: Hatchet::BacktraceFormatter

Included in:
PlainFormatter, SimpleFormatter, StandardFormatter, StructuredFormatter
Defined in:
lib/hatchet/backtrace_formatter.rb

Overview

Internal: Module for handling the common code for conditionally including the backtrace within a formatted message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backtrace_limitObject

Public: Gets and sets the number of lines to limit backtraces to.

If set to nil, the entire backtrace will be used.



30
31
32
# File 'lib/hatchet/backtrace_formatter.rb', line 30

def backtrace_limit
  @backtrace_limit
end

Instance Method Details

#backtraceObject

Public: Gets whether backtraces are enabled.

Defaults to true if it has not been set.



14
15
16
# File 'lib/hatchet/backtrace_formatter.rb', line 14

def backtrace
  @backtrace.nil? ? true : @backtrace
end

#backtrace=(value) ⇒ Object

Public: Sets whether backtraces should be enabled.

value - True if backtraces should be enabled, otherwise false.



22
23
24
# File 'lib/hatchet/backtrace_formatter.rb', line 22

def backtrace=(value)
  @backtrace = value
end