18 references to AddToList
Microsoft.AspNetCore.HttpLogging (18)
W3CLoggingMiddleware.cs (18)
84shouldLog |= AddToList(elements, _dateIndex, now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); 89shouldLog |= AddToList(elements, _timeIndex, now.ToString("HH:mm:ss", CultureInfo.InvariantCulture)); 95shouldLog |= AddToList(elements, _serverNameIndex, _serverName); 104shouldLog |= AddToList(elements, _clientIpIndex, connectionInfo.RemoteIpAddress is null ? "" : connectionInfo.RemoteIpAddress.ToString()); 109shouldLog |= AddToList(elements, _serverIpIndex, connectionInfo.LocalIpAddress is null ? "" : connectionInfo.LocalIpAddress.ToString()); 114shouldLog |= AddToList(elements, _serverPortIndex, connectionInfo.LocalPort.ToString(CultureInfo.InvariantCulture)); 124shouldLog |= AddToList(elements, _protocolVersionIndex, request.Protocol); 129shouldLog |= AddToList(elements, _methodIndex, request.Method); 134shouldLog |= AddToList(elements, _uriStemIndex, (request.PathBase + request.Path).ToUriComponent()); 139shouldLog |= AddToList(elements, _uriQueryIndex, request.QueryString.Value); 148shouldLog |= AddToList(elements, _hostIndex, host.ToString()); 156shouldLog |= AddToList(elements, _refererIndex, referer.ToString()); 164shouldLog |= AddToList(elements, _userAgentIndex, agent.ToString()); 174shouldLog |= AddToList(elements, _cookieIndex, cookie.ToString()); 186shouldLog |= AddToList(additionalHeaderElements, i, headerValue.ToString()); 209shouldLog |= AddToList(elements, _userNameIndex, context.User?.Identity?.Name ?? ""); 214shouldLog |= AddToList(elements, _protocolStatusIndex, StatusCodeHelper.ToStatusString(response.StatusCode)); 219shouldLog |= AddToList(elements, _timeTakenIndex, stopWatch.GetElapsedTime().TotalMilliseconds.ToString(CultureInfo.InvariantCulture));