Commit fc8a50a8 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

debug

parent 2e7672eb
...@@ -815,6 +815,7 @@ func (s *wafService) ListAttackLogs(ctx context.Context, req *AttackLogFilter) ( ...@@ -815,6 +815,7 @@ func (s *wafService) ListAttackLogs(ctx context.Context, req *AttackLogFilter) (
} }
} }
log.Info().Interface("limit", req.Limit).Msg("limit")
res, err := ss.Query(boolQuery).Size(req.Limit). res, err := ss.Query(boolQuery).Size(req.Limit).
SortBy(elastic.NewFieldSort("attack_time").Order(false), SortBy(elastic.NewFieldSort("attack_time").Order(false),
elastic.NewFieldSort("id.digit").Order(false)). elastic.NewFieldSort("id.digit").Order(false)).
...@@ -827,7 +828,7 @@ func (s *wafService) ListAttackLogs(ctx context.Context, req *AttackLogFilter) ( ...@@ -827,7 +828,7 @@ func (s *wafService) ListAttackLogs(ctx context.Context, req *AttackLogFilter) (
list := make([]model.WafDetection, len(res.Hits.Hits)) list := make([]model.WafDetection, len(res.Hits.Hits))
endIdx := len(res.Hits.Hits) - 1 endIdx := len(res.Hits.Hits) - 1
pageToken := "" pageToken := ""
log.Info().Interface("hits", res.Hits.Hits).Msg("list attack logs res") log.Info().Interface("res", res).Msg("list attack logs res")
for i, hit := range res.Hits.Hits { for i, hit := range res.Hits.Hits {
log.Info().Interface("hit source", hit.Source).Msg("hit") log.Info().Interface("hit source", hit.Source).Msg("hit")
wafDetection := model.WafDetection{} wafDetection := model.WafDetection{}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment