transparency-dev / trillian-tessera

Go library for building tile-based transparency logs (tlogs)
Apache License 2.0
11 stars 11 forks source link

Squash duplicate errors in hammer #250

Closed AlCutter closed 2 months ago

AlCutter commented 2 months ago

This PR "squashes" duplicate errors printed out by the hammer.

When there's an error talking to the target log, the hammer logs the error as a Warn entry. In theory this is great, but in practice errors tend to come in floods which has the unfortunate effect of making it hard to see what's going on because there's a flood of error messages whipping past.

This PR turns a run of identical errors into a single line with a count:

W0912 14:44:46.326227 463 hammer.go:341] (129 x) failed to create request: write leaf was not OK. Status code: 500. Body: ...