Skip to content

Commit

Permalink
style: add more log
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotxx committed Dec 15, 2023
1 parent c026288 commit c288963
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/core/manager/audit/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ func (m *AuditManager) Audit(ctx context.Context, locator *core.Locator) (*Audit
pageIteration := 1

if auditData, exist := m.c.Get(*locator); exist {
log.Info("Cache hit for locator", "locator", locator)
return auditData, nil
} else {
log.Info("Cache miss for locator", "locator", locator)

var allIssues []*scanner.Issue
for {
log.Info("Starting search in AuditManager ...",
Expand Down Expand Up @@ -99,6 +102,8 @@ func (m *AuditManager) Audit(ctx context.Context, locator *core.Locator) (*Audit

data := NewAuditData(allIssues, total)
m.c.Set(*locator, data)
log.Info("Added data to cache for locator", "locator", locator)

return data, nil
}
}
Expand Down

0 comments on commit c288963

Please sign in to comment.