Module: Dynflow::Actor::LogWithFullBacktrace

Included in:
Dynflow::Actor, SetResultsWithOriginLogging
Defined in:
lib/dynflow/actor.rb

Instance Method Summary collapse

Instance Method Details

#log(level, message = nil, &block) ⇒ Object



38
39
40
41
42
43
44
45
46
# File 'lib/dynflow/actor.rb', line 38

def log(level, message = nil, &block)
  if message.is_a? Exception
    error = message
    backtrace = Actor::BacktraceCollector.full_backtrace(error.backtrace)
    log(level, format("%s (%s)\n%s", error.message, error.class, backtrace.join("\n")))
  else
    super
  end
end