add RetryAttempts to AccessLog in JSON format

This commit is contained in:
Marco Jantke 2017-08-28 12:50:02 +02:00 committed by Traefiker
parent 23cdb37165
commit dae7e7a80a
11 changed files with 130 additions and 90 deletions

View file

@ -180,9 +180,11 @@ func usernameIfPresent(theURL *url.URL) string {
// Logging handler to log frontend name, backend name, and elapsed time
func (l *LogHandler) logTheRoundTrip(logDataTable *LogData, crr *captureRequestReader, crw *captureResponseWriter) {
core := logDataTable.Core
if core[RetryAttempts] == nil {
core[RetryAttempts] = 0
}
if crr != nil {
core[RequestContentSize] = crr.count
}