Class: Dynflow::LoggerAdapters::Formatters::Exception

Inherits:
Abstract
  • Object
show all
Defined in:
lib/dynflow/logger_adapters/formatters/exception.rb

Instance Method Summary collapse

Methods inherited from Abstract

#initialize, #level, #level=

Constructor Details

This class inherits a constructor from Dynflow::LoggerAdapters::Formatters::Abstract

Instance Method Details

#format(message) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/dynflow/logger_adapters/formatters/exception.rb', line 5

def format(message)
  if ::Exception === message
    "#{message.message} (#{message.class})\n#{message.backtrace.join("\n")}"
  else
    message
  end
end