lib/leap_cli/logger.rb in leap_cli-1.7.4 vs lib/leap_cli/logger.rb in leap_cli-1.8
- old
+ new
@@ -111,11 +111,11 @@
{ :match => /.*out\] (fatal:|ERROR:).*/, :color => :red, :match_level => 1, :priority => -10 },
{ :match => /Permission denied/, :color => :red, :match_level => 1, :priority => -20 },
{ :match => /sh: .+: command not found/, :color => :magenta, :match_level => 1, :priority => -30 },
# IMPORTANT
- { :match => /^err ::/, :color => :red, :match_level => 0, :priority => -10, :exit => 1},
+ { :match => /^(E|e)rr ::/, :color => :red, :match_level => 0, :priority => -10, :exit => 1},
{ :match => /^ERROR:/, :color => :red, :priority => -10, :exit => 1},
{ :match => /.*/, :color => :blue, :match_level => 0, :priority => -20 },
# CLEANUP
{ :match => /\s+$/, :replace => '', :priority => 0},
@@ -127,23 +127,27 @@
{ :match => /^E: /, :color => :red, :priority => -20},
{ :match => /already the newest version/, :color => :green, :priority => -20},
{ :match => /WARNING: The following packages cannot be authenticated!/, :color => :red, :level => 0, :priority => -10},
# PUPPET
- { :match => /^warning: .*is deprecated.*$/, :level => 2, :color => :yellow, :priority => -10},
- { :match => /^warning: Scope.*$/, :level => 2, :color => :yellow, :priority => -10},
- { :match => /^notice:/, :level => 1, :color => :cyan, :priority => -20},
- { :match => /^notice:.*executed successfully$/, :level => 2, :color => :cyan, :priority => -15},
- { :match => /^warning:/, :level => 0, :color => :yellow, :priority => -20},
- { :match => /^Duplicate declaration:/, :level => 0, :color => :red, :priority => -20},
- { :match => /Finished catalog run/, :level => 0, :color => :green, :priority => -10},
+ { :match => /^(W|w)arning: Not collecting exported resources without storeconfigs/, :level => 2, :color => :yellow, :priority => -10},
+ { :match => /^(W|w)arning: Found multiple default providers for vcsrepo:/, :level => 2, :color => :yellow, :priority => -10},
+ { :match => /^(W|w)arning: .*is deprecated.*$/, :level => 2, :color => :yellow, :priority => -10},
+ { :match => /^(W|w)arning: Scope.*$/, :level => 2, :color => :yellow, :priority => -10},
+ { :match => /^(N|n)otice:/, :level => 1, :color => :cyan, :priority => -20},
+ { :match => /^(N|n)otice:.*executed successfully$/, :level => 2, :color => :cyan, :priority => -15},
+ { :match => /^(W|w)arning:/, :level => 0, :color => :yellow, :priority => -20},
+ { :match => /^Duplicate declaration:/, :level => 0, :color => :red, :priority => -20},
+ { :match => /Finished catalog run/, :level => 0, :color => :green, :priority => -10},
{ :match => /^APPLY COMPLETE \(changes made\)/, :level => 0, :color => :green, :priority => -10},
- { :match => /^APPLY COMPLETE \(no changes\)/, :level => 0, :color => :green, :priority => -10},
+ { :match => /^APPLY COMPLETE \(no changes\)/, :level => 0, :color => :green, :priority => -10},
# PUPPET FATAL ERRORS
- { :match => /^err:/, :level => 0, :color => :red, :priority => -1, :exit => 1},
+ { :match => /^(E|e)rr(or|):/, :level => 0, :color => :red, :priority => -1, :exit => 1},
+ { :match => /^Wrapped exception:/, :level => 0, :color => :red, :priority => -1, :exit => 1},
{ :match => /^Failed to parse template/, :level => 0, :color => :red, :priority => -1, :exit => 1},
+ { :match => /^Execution of.*returned/, :level => 0, :color => :red, :priority => -1, :exit => 1},
{ :match => /^Parameter matches failed:/, :level => 0, :color => :red, :priority => -1, :exit => 1},
{ :match => /^Syntax error/, :level => 0, :color => :red, :priority => -1, :exit => 1},
{ :match => /^Cannot reassign variable/, :level => 0, :color => :red, :priority => -1, :exit => 1},
{ :match => /^Could not find template/, :level => 0, :color => :red, :priority => -1, :exit => 1},
{ :match => /^APPLY COMPLETE.*fail/, :level => 0, :color => :red, :priority => -1, :exit => 1},
@@ -153,11 +157,11 @@
{ :match => /^(FAIL|ERROR): /, :color => :red, :priority => -20},
{ :match => /^(SKIP|WARN): /, :color => :yellow, :priority => -20},
{ :match => /\d+ tests: \d+ passes, \d+ skips, 0 warnings, 0 failures, 0 errors/, :color => :blue, :priority => -20},
# LOG SUPPRESSION
- { :match => /^warning: You cannot collect without storeconfigs being set/, :level => 2, :priority => 10},
- { :match => /^warning: You cannot collect exported resources without storeconfigs being set/, :level => 2, :priority => 10}
+ { :match => /^(W|w)arning: You cannot collect without storeconfigs being set/, :level => 2, :priority => 10},
+ { :match => /^(W|w)arning: You cannot collect exported resources without storeconfigs being set/, :level => 2, :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) }