Skip to content

Commit

Permalink
[logger] Properly format duration (#199)
Browse files Browse the repository at this point in the history
%d prints ns, not ms. %s will format appropriately for all values.
  • Loading branch information
dstrelau authored Dec 28, 2020
1 parent 0ed99dc commit 1e2de43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logger/honeycomb.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (h *HoneycombLogger) Start() error {
func (h *HoneycombLogger) readResponses() {
resps := h.libhClient.TxResponses()
for resp := range resps {
respString := fmt.Sprintf("Response: status: %d, duration: %dms", resp.StatusCode, resp.Duration)
respString := fmt.Sprintf("Response: status: %d, duration: %s", resp.StatusCode, resp.Duration)
// read response, log if there's an error
switch {
case resp.StatusCode == 0: // log message dropped due to sampling
Expand Down

0 comments on commit 1e2de43

Please sign in to comment.