Class: Cogger::Formatters::Crash
- Defined in:
- lib/cogger/formatters/crash.rb
Overview
Formats fatal crashes.
Constant Summary collapse
- TEMPLATE =
<<~CONTENT <dynamic>[%<id>s] [%<level>s] [%<at>s] Crash! %<message>s %<error_message>s (%<error_class>s) %<backtrace>s</dynamic> CONTENT
Constants inherited from Abstract
Abstract::NEW_LINE, Abstract::SANITIZERS
Instance Method Summary collapse
- #call(*input) ⇒ Object
-
#initialize(template = TEMPLATE, parser: Parsers::Combined.new) ⇒ Crash
constructor
A new instance of Crash.
Constructor Details
Instance Method Details
#call(*input) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/cogger/formatters/crash.rb', line 20 def call(*input) *, entry = input attributes = sanitize entry, :tagged attributes[:backtrace] = %( #{attributes[:backtrace].join "\n "}) format(parse(attributes[:level]), attributes) << NEW_LINE end |