aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-11-04 15:41:41 -0800
committerelijah <elijah@riseup.net>2014-11-04 15:41:41 -0800
commit1ba5abc1a9359a00cee2da06b9766eb0bdda9f29 (patch)
tree522f67013d5127ba9b4e2616b726b68be9944758 /lib
parent2847c017ea184ef2a2b19e01ac38c2ac4b492c66 (diff)
downloadleap_cli-1ba5abc1a9359a00cee2da06b9766eb0bdda9f29.tar.gz
leap_cli-1ba5abc1a9359a00cee2da06b9766eb0bdda9f29.tar.bz2
logging - suppress warnings 'You cannot collect without storeconfigs being set' (unless -v2)
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/logger.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/leap_cli/logger.rb b/lib/leap_cli/logger.rb
index cc23aa8..29e3f0a 100644
--- a/lib/leap_cli/logger.rb
+++ b/lib/leap_cli/logger.rb
@@ -84,6 +84,19 @@ module LeapCli
## FORMATTING
##
+ #
+ # options for formatters:
+ #
+ # :match => regexp for matching a log line
+ # :color => what color the line should be
+ # :style => what style the line should be
+ # :priority => what order the formatters are applied in. higher numbers first.
+ # :match_level => only apply filter at the specified log level
+ # :level => make this line visible at this log level or higher
+ # :replace => replace the matched text
+ # :exit => force the exit code to be this (does not interrupt program, just
+ # ensures a specific exit code when the program eventually exits)
+ #
@formatters = [
# TRACE
{ :match => /command finished/, :color => :white, :style => :dim, :match_level => 3, :priority => -10 },
@@ -138,8 +151,10 @@ module LeapCli
# TESTS
{ :match => /^PASS: /, :color => :green, :priority => -20},
{ :match => /^(FAIL|ERROR): /, :color => :red, :priority => -20},
- { :match => /^(SKIP|WARN): /, :color => :yellow, :priority => -20}
+ { :match => /^(SKIP|WARN): /, :color => :yellow, :priority => -20},
+ # LOG SUPPRESSION
+ { :match => /^warning: You cannot collect without storeconfigs being set/, :level => 2, :priority => 10}
]
def self.sorted_formatters