Browse Source

refactor5

pagy
pvincent 10 months ago
parent
commit
a340f9e9ff
  1. 8
      lib/formatters/basic_formatter.rb

8
lib/formatters/basic_formatter.rb

@ -94,10 +94,10 @@ class BasicFormatter < SemanticLogger::Formatters::Color # rubocop:disable Metri
def exception
return unless log.exception
backtrace = backtrace(log.exception)
"#{ansi_wrap(log.exception.class,
ANSI_REVERSED_WARNING)} #{ansi_wrap(log.exception.message, ANSI_REVERSED_ERROR)}#{backtrace}"
clazz = log.exception.class
message = log.exception.message
stack = backtrace(log.exception)
"#{ansi_wrap(clazz, ANSI_REVERSED_WARNING)} #{ansi_wrap(message, ANSI_REVERSED_ERROR)}#{stack}"
end
def call(log, logger)

Loading…
Cancel
Save