Skip to content

Commit

Permalink
remove full url from log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Jan 14, 2020
1 parent c23aef7 commit 2bc407f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/tracker/httptracker/httptracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (t *HTTPTracker) Announce(ctx context.Context, req tracker.AnnounceRequest)
if err != nil {
return 0, nil, err
}
t.log.Debugf("tracker responded %d with %d bytes body for %q", resp.StatusCode, resp.ContentLength, u.String())
t.log.Debugf("tracker responded %d with %d bytes body", resp.StatusCode, resp.ContentLength)
defer resp.Body.Close()
if resp.ContentLength > t.maxResponseLength {
return 0, nil, fmt.Errorf("tracker respsonse too large: %d", resp.ContentLength)
Expand All @@ -113,7 +113,7 @@ func (t *HTTPTracker) Announce(ctx context.Context, req tracker.AnnounceRequest)
if err != nil {
return nil, err
}
t.log.Debugf("read %d bytes from body for %q", len(body), u.String())
t.log.Debugf("read %d bytes from body", len(body))

var response announceResponse
err = bencode.DecodeBytes(body, &response)
Expand Down Expand Up @@ -156,6 +156,7 @@ func (t *HTTPTracker) Announce(ctx context.Context, req tracker.AnnounceRequest)
if err != nil {
return nil, err
}
t.log.Debugf("got %d peers", len(peers))

// Filter external IP
if len(response.ExternalIP) != 0 {
Expand Down

0 comments on commit 2bc407f

Please sign in to comment.