summaryrefslogtreecommitdiff
path: root/lib/leap_cli/logger.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/logger.rb')
-rw-r--r--lib/leap_cli/logger.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/leap_cli/logger.rb b/lib/leap_cli/logger.rb
index 8cd5a0a..2010f15 100644
--- a/lib/leap_cli/logger.rb
+++ b/lib/leap_cli/logger.rb
@@ -114,6 +114,11 @@ module LeapCli
{ :match => /Finished catalog run/, :level => 0, :color => :green, :priority => -10},
]
+ def self.sorted_formatters
+ # Sort matchers in reverse order so we can break if we found a match.
+ @sorted_formatters ||= @formatters.sort_by { |i| -(i[:priority] || i[:prio] || 0) }
+ end
+
@prefix_formatters = [
{ :match => /(err|out) :: /, :replace => '', :priority => 0},
{ :match => /\s+$/, :replace => '', :priority => 0}