aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-28 10:30:30 -0800
committerelijah <elijah@riseup.net>2012-11-28 10:30:30 -0800
commit16f9ee1668a06d6b83dfc312d0601d4f235ab8ef (patch)
treee17ed623f5e611cdf485ac7487a3475f2018c874
parent38e87145dee1060e24ec679c2e25fdde14e13c37 (diff)
downloadleap_cli-16f9ee1668a06d6b83dfc312d0601d4f235ab8ef.tar.gz
leap_cli-16f9ee1668a06d6b83dfc312d0601d4f235ab8ef.tar.bz2
i am unable to reproduce bug #1058, but this commit might fix it.
-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}