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

Commit

Permalink
logging cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcz committed May 31, 2021
1 parent d6b7c64 commit b6f2972
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (s *Scraper) scrape() bool {
ret := true
for _, q := range queries {
if err := scrapeQuery(l, q); err != nil {
s.log.WithError(err).Warn("query failed")
s.log.WithError(err).WithField("filter", q.searchFilter).Warn("query failed")
ret = false
}
}
Expand Down
4 changes: 2 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ func (s *Server) adaptor(kvs ...interface{}) error {
key := fmt.Sprint(kvs[i])
fields[key] = kvs[i+1]
}
msg := ""
var msg string
if val, ok := fields["msg"]; ok {
delete(fields, "msg")
msg = fmt.Sprint(val)
}
level := "info"
var level string
if val, ok := fields["level"]; ok {
delete(fields, "level")
level = fmt.Sprint(val)
Expand Down

0 comments on commit b6f2972

Please sign in to comment.