add debug
This commit is contained in:
parent
51295ef577
commit
4332598cd1
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/crowdsecurity/crowdsec/pkg/types"
|
||||
"github.com/crowdsecurity/crowdsec/pkg/waf"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func EventFromRequest(r waf.ParsedRequest) (types.Event, error) {
|
||||
|
@ -115,11 +116,12 @@ func (r *WafRunner) AccumulateTxToEvent(tx experimental.FullTransaction, kind st
|
|||
return true
|
||||
})
|
||||
|
||||
r.logger.Infof("variables addr in AccumulateTxToEvent: %p", tx.Variables())
|
||||
//log.Infof("variables: %s", spew.Sdump(tx.Variables()))
|
||||
//log.Infof("tx variables: %+v", tx.Collection(variables.TX))
|
||||
//log.Infof("TX %s", spew.Sdump(tx.MatchedRules()))
|
||||
|
||||
for _, rule := range tx.MatchedRules() {
|
||||
log.Infof("Matched rules ID: %+v", rule.Rule().ID())
|
||||
if rule.Message() == "" {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue