Browse Source

started before:1

main
pvincent 6 months ago
parent
commit
c42ca8aa12
  1. 12
      lib/formatters/ansi_filter.rb

12
lib/formatters/ansi_filter.rb

@ -19,11 +19,15 @@ module AnsiFilter
log.message.chomp!('') log.message.chomp!('')
if log.message.starts_with?('Started') if log.message.starts_with?('Started')
rails = '╓─╖' rails = '╓─╖'
rails = "#{$memory}" if $memory
log.dimensions = AnsiDimensions.new(rails:)
before = 1
if $memory
rails = "#{$memory}"
before = 0
end
log.dimensions = AnsiDimensions.new(rails:, before:)
$memory = nil $memory = nil
elsif log.message.starts_with?('Completed 2') elsif log.message.starts_with?('Completed 2')
log.dimensions = AnsiDimensions.new(rails: TERMINUS_STRING, after: 2)
log.dimensions = AnsiDimensions.new(rails: TERMINUS_STRING, after: 1)
elsif log.message.starts_with?('Completed 3') elsif log.message.starts_with?('Completed 3')
$memory = '║' $memory = '║'
log.dimensions = AnsiDimensions.new(rails: "#{$memory}") log.dimensions = AnsiDimensions.new(rails: "#{$memory}")
@ -35,7 +39,7 @@ module AnsiFilter
elsif log.exception elsif log.exception
log.dimensions = AnsiDimensions.new( log.dimensions = AnsiDimensions.new(
rails: "#{draw_fatal(log.level.to_s.chr.upcase)}", rails: "#{draw_fatal(log.level.to_s.chr.upcase)}",
after: 2,
after: 1,
terminus: true terminus: true
) )
end end

Loading…
Cancel
Save