Skip to content

Commit

Permalink
query param should have a ? in trace (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Nov 19, 2020
1 parent ce2ac61 commit 18f3ddb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion http-tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ func (s shortTraceMsg) String() string {
fmt.Fprintf(b, "[%s] ", statusStr)
fmt.Fprintf(b, " %s ", s.Host)

fmt.Fprintf(b, "%s %s%s", s.Method, s.Path, s.Query)
if s.Query != "" {
fmt.Fprintf(b, "%s %s?%s", s.Method, s.Path, s.Query)
} else {
fmt.Fprintf(b, "%s %s", s.Method, s.Path)
}
fmt.Fprintf(b, " %s ", s.Client)
spaces := 15 - len(s.Client)
fmt.Fprintf(b, "%*s", spaces, " ")
Expand Down

0 comments on commit 18f3ddb

Please sign in to comment.