Class: QB::Ansible::Module::Formatters::Processor
- Inherits:
-
SemanticLogger::Formatters::Default
- Object
- SemanticLogger::Formatters::Default
- QB::Ansible::Module::Formatters::Processor
- Defined in:
- lib/qb/ansible/module.rb
Instance Method Summary collapse
- #backtrace_to_s ⇒ Object
-
#exception ⇒ Object
Exception.
Instance Method Details
#backtrace_to_s ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/qb/ansible/module.rb', line 65 def backtrace_to_s lines = log.backtrace_to_s.lines if lines.length > 42 lines = [ *lines[0..21], "\n# ...\n\n", *lines[-21..-1] ] end lines.join end |
#exception ⇒ Object
Exception
80 81 82 |
# File 'lib/qb/ansible/module.rb', line 80 def exception "-- Exception: #{log.exception.class}: #{log.exception.}\n#{backtrace_to_s}" if log.exception end |