()
| 748 | } |
| 749 | |
| 750 | func (h *handler) logRequestLine() { |
| 751 | |
| 752 | logLevel := base.LevelInfo |
| 753 | if h.httpLogLevel != nil { |
| 754 | logLevel = *h.httpLogLevel |
| 755 | } |
| 756 | |
| 757 | // Check Log Level first, as SanitizeRequestURL is expensive to evaluate. |
| 758 | if !base.LogLevelEnabled(h.ctx(), logLevel, base.KeyHTTP) { |
| 759 | return |
| 760 | } |
| 761 | |
| 762 | proto := "" |
| 763 | if h.rq.ProtoMajor >= 2 { |
| 764 | proto = " HTTP/2" |
| 765 | } |
| 766 | |
| 767 | queryValues := h.getQueryValues() |
| 768 | |
| 769 | base.LogLevelCtx(h.ctx(), logLevel, base.KeyHTTP, "%s %s%s%s", h.rq.Method, base.SanitizeRequestURL(h.rq, &queryValues), proto, h.formattedEffectiveUserName()) |
| 770 | } |
| 771 | |
| 772 | // shouldUpdateBytesTransferredStats returns true if we want to log the bytes transferred. The criteria is if this is db scoped over the public port. Blip is skipped since those stats are tracked separately. |
| 773 | func (h *handler) shouldUpdateBytesTransferredStats() bool { |
no test coverage detected