@@ -52,14 +52,14 @@ func (c *customBouncer) Add(decision *models.Decision) error {
5252 if err != nil {
5353 return err
5454 }
55- log .Printf ("custom [%s] : add ban on %s for %s sec (%s)" , c .path , * decision .Value , strconv .Itoa (int (banDuration .Seconds ())), * decision .Scenario )
55+ log .Debugf ("custom [%s] : add ban on %s for %s sec (%s)" , c .path , * decision .Value , strconv .Itoa (int (banDuration .Seconds ())), * decision .Scenario )
5656 str , err := serializeDecision (decision )
5757 if err != nil {
5858 log .Warningf ("serialize: %s" , err )
5959 }
6060 cmd := exec .Command (c .path , "add" , * decision .Value , strconv .Itoa (int (banDuration .Seconds ())), * decision .Scenario , str )
6161 if out , err := cmd .CombinedOutput (); err != nil {
62- log .Infof ("Error in 'add' command (%s): %v --> %s" , cmd .String (), err , string (out ))
62+ log .Errorf ("Error in 'add' command (%s): %v --> %s" , cmd .String (), err , string (out ))
6363 }
6464 c .newDecisionValueSet [decisionToDecisionKey (decision )] = struct {}{}
6565 return nil
@@ -77,10 +77,10 @@ func (c *customBouncer) Delete(decision *models.Decision) error {
7777 if err != nil {
7878 log .Warningf ("serialize: %s" , err )
7979 }
80- log .Printf ("custom [%s] : del ban on %s for %s sec (%s)" , c .path , * decision .Value , strconv .Itoa (int (banDuration .Seconds ())), * decision .Scenario )
80+ log .Debugf ("custom [%s] : del ban on %s for %s sec (%s)" , c .path , * decision .Value , strconv .Itoa (int (banDuration .Seconds ())), * decision .Scenario )
8181 cmd := exec .Command (c .path , "del" , * decision .Value , strconv .Itoa (int (banDuration .Seconds ())), * decision .Scenario , str )
8282 if out , err := cmd .CombinedOutput (); err != nil {
83- log .Infof ("Error in 'del' command (%s): %v --> %s" , cmd .String (), err , string (out ))
83+ log .Errorf ("Error in 'del' command (%s): %v --> %s" , cmd .String (), err , string (out ))
8484 }
8585 c .expiredDecisionValueSet [decisionToDecisionKey (decision )] = struct {}{}
8686 return nil
0 commit comments