From 1ba5abc1a9359a00cee2da06b9766eb0bdda9f29 Mon Sep 17 00:00:00 2001
From: elijah <elijah@riseup.net>
Date: Tue, 4 Nov 2014 15:41:41 -0800
Subject: logging - suppress warnings 'You cannot collect without storeconfigs
 being set' (unless -v2)

---
 lib/leap_cli/logger.rb | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

(limited to 'lib')

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
-- 
cgit v1.2.3