@@ -52,14 +52,14 @@ func (c *customBouncer) Add(decision *models.Decision) error {
52
52
if err != nil {
53
53
return err
54
54
}
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 )
56
56
str , err := serializeDecision (decision )
57
57
if err != nil {
58
58
log .Warningf ("serialize: %s" , err )
59
59
}
60
60
cmd := exec .Command (c .path , "add" , * decision .Value , strconv .Itoa (int (banDuration .Seconds ())), * decision .Scenario , str )
61
61
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 ))
63
63
}
64
64
c .newDecisionValueSet [decisionToDecisionKey (decision )] = struct {}{}
65
65
return nil
@@ -77,10 +77,10 @@ func (c *customBouncer) Delete(decision *models.Decision) error {
77
77
if err != nil {
78
78
log .Warningf ("serialize: %s" , err )
79
79
}
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 )
81
81
cmd := exec .Command (c .path , "del" , * decision .Value , strconv .Itoa (int (banDuration .Seconds ())), * decision .Scenario , str )
82
82
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 ))
84
84
}
85
85
c .expiredDecisionValueSet [decisionToDecisionKey (decision )] = struct {}{}
86
86
return nil
0 commit comments