Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
uniform scrape logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcz committed May 30, 2021
1 parent 2c3c77a commit 061733e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (s *Scraper) scrape() bool {
ret := true
for _, q := range queries {
if err := scrapeQuery(l, q); err != nil {
log.Println(err.Error())
log.Printf("query failed: %v\n", err)
ret = false
}
}
Expand All @@ -166,7 +166,7 @@ func scrapeQuery(l *ldap.Conn, q *query) error {
)
sr, err := l.Search(req)
if err != nil {
return fmt.Errorf("search failed: %w", err)
return err
}
for _, entry := range sr.Entries {
val := entry.GetAttributeValue(q.searchAttr)
Expand Down

0 comments on commit 061733e

Please sign in to comment.