Class: Solid::Process::EventLogs::BasicLoggerListener
- Inherits:
-
Object
- Object
- Solid::Process::EventLogs::BasicLoggerListener
- Includes:
- ActiveSupport::Configurable, Result::EventLogs::Listener
- Defined in:
- lib/solid/process/event_logs/basic_logger_listener.rb
Defined Under Namespace
Modules: MessagesNesting
Instance Method Summary collapse
Instance Method Details
#before_interruption(exception:, event_logs:) ⇒ Object
69 70 71 72 73 74 75 76 77 |
# File 'lib/solid/process/event_logs/basic_logger_listener.rb', line 69 def before_interruption(exception:, event_logs:) = MessagesNesting.map(event_logs) logger.info .join("\n") cleaned_backtrace = backtrace_cleaner.clean(exception.backtrace).join("\n ") logger.error "\nException:\n #{exception.} (#{exception.class})\n\nBacktrace:\n #{cleaned_backtrace}" end |
#on_finish(event_logs:) ⇒ Object
63 64 65 66 67 |
# File 'lib/solid/process/event_logs/basic_logger_listener.rb', line 63 def on_finish(event_logs:) = MessagesNesting.map(event_logs) logger.info .join("\n") end |