Browse Source

type of error appears in yellow

pagy
pvincent 8 months ago
parent
commit
1ec2c1af0d
  1. 2
      lib/formatters/basic_formatter.rb

2
lib/formatters/basic_formatter.rb

@ -83,7 +83,7 @@ class BasicFormatter < SemanticLogger::Formatters::Color
stack = log.exception.backtrace.select { |line| line.starts_with?(root_path) } stack = log.exception.backtrace.select { |line| line.starts_with?(root_path) }
stack = stack.map { |line| line.delete_prefix("#{root_path}/") } stack = stack.map { |line| line.delete_prefix("#{root_path}/") }
"#{ANSI_REVERSED_ERROR}#{log.exception.class}#{color_map.clear}: #{color}#{log.exception.message}#{color_map.clear}#{backtrace(stack)}" # rubocop:disable Layout/LineLength
"#{ANSI_REVERSED_WARNING}#{log.exception.class}#{color_map.clear} #{ANSI_REVERSED_ERROR}#{log.exception.message}#{color_map.clear}#{backtrace(stack)}" # rubocop:disable Layout/LineLength
end end
def call(log, logger) def call(log, logger)

Loading…
Cancel
Save