Skip to content

Commit

Permalink
Convert stray fmt.Printf into logger.Printf (#203)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?

- There's a stray `fmt.Printf` line in `transmission.go`

## Short description of the changes

- I've converted it into a logger line, but I'm not sure if this is
intentionally left in or not
  • Loading branch information
glenjamin authored Oct 21, 2022
1 parent f664d4a commit a25604f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion transmission/transmission.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ func (b *batchAgg) fireBatch(events []*Event) {
for _, resp := range batchResponses {
resp.Duration = dur / time.Duration(numEncoded)
for eIdx < len(events) && events[eIdx] == nil {
fmt.Printf("incr, eIdx: %d, len(evs): %d\n", eIdx, len(events))
b.logger.Printf("incr, eIdx: %d, len(evs): %d", eIdx, len(events))
eIdx++
}
if eIdx == len(events) { // just in case
Expand Down
2 changes: 2 additions & 0 deletions transmission/transmission_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ func TestFireBatchWithBrokenFirstEvent(t *testing.T) {
withJSONAndMsgpack(t, &doMsgpack, func(t *testing.T) {
trt := &testRoundTripper{}
b := &batchAgg{
logger: &nullLogger{},
httpClient: &http.Client{Transport: trt},
testNower: &fakeNower{},
testBlocker: &sync.WaitGroup{},
Expand Down Expand Up @@ -864,6 +865,7 @@ func TestFireBatchWithBrokenMiddleEvent(t *testing.T) {
runEvents := func(ev ...*Event) {
trt := &testRoundTripper{}
b := &batchAgg{
logger: &nullLogger{},
httpClient: &http.Client{Transport: trt},
testNower: &fakeNower{},
// testBlocker: &sync.WaitGroup{},
Expand Down

0 comments on commit a25604f

Please sign in to comment.