8 instantiations of HttpLoggingAttribute
Microsoft.AspNetCore.HttpLogging (1)
HttpLoggingEndpointConventionBuilderExtensions.cs (1)
26var metadata = new HttpLoggingAttribute(loggingFields);
Microsoft.AspNetCore.HttpLogging.Tests (7)
HttpLoggingAttributeTests.cs (3)
11var ex = Assert.Throws<ArgumentOutOfRangeException>(() => new HttpLoggingAttribute(HttpLoggingFields.None) { RequestBodyLogLimit = -1 }); 14ex = Assert.Throws<ArgumentOutOfRangeException>(() => new HttpLoggingAttribute(HttpLoggingFields.None) { ResponseBodyLogLimit = -1 }); 21var attribute = new HttpLoggingAttribute(HttpLoggingFields.None);
HttpLoggingMiddlewareTests.cs (4)
2031endpoint.MapGet("/attr_responseonly", [HttpLogging(HttpLoggingFields.Response)] async (HttpContext c) => 2043endpoint.MapGet("/attr_responseandrequest", [HttpLogging(HttpLoggingFields.All)] async (HttpContext c) => 2056endpoint.MapGet("/attr_restrictedheaders", [HttpLogging((HttpLoggingFields.Request & ~HttpLoggingFields.RequestScheme) | (HttpLoggingFields.Response & ~HttpLoggingFields.ResponseStatusCode))] async (HttpContext c) => 2068endpoint.MapGet("/attr_restrictedsize", [HttpLogging(HttpLoggingFields.RequestBody | HttpLoggingFields.ResponseBody, RequestBodyLogLimit = 3, ResponseBodyLogLimit = 6)] async (HttpContext c) =>
14 references to HttpLoggingAttribute
Microsoft.AspNetCore.HttpLogging (9)
HttpLoggingAttribute.cs (1)
13/// Initializes an instance of the <see cref="HttpLoggingAttribute"/> class.
HttpLoggingEndpointConventionBuilderExtensions.cs (1)
26var metadata = new HttpLoggingAttribute(loggingFields);
HttpLoggingInterceptorContext.cs (4)
14/// values from <see cref="HttpLoggingAttribute"/> or 44/// <see cref="HttpLoggingAttribute.LoggingFields"/>, or 54/// <see cref="HttpLoggingAttribute.RequestBodyLogLimit"/>, or 64/// <see cref="HttpLoggingAttribute.ResponseBodyLogLimit"/>, or
HttpLoggingMiddleware.cs (3)
58var loggingAttribute = context.GetEndpoint()?.Metadata.GetMetadata<HttpLoggingAttribute>(); 71HttpLoggingAttribute? loggingAttribute, HttpLoggingFields loggingFields)
Microsoft.AspNetCore.HttpLogging.Tests (5)
HttpLoggingAttributeTests.cs (3)
12Assert.Equal(nameof(HttpLoggingAttribute.RequestBodyLogLimit), ex.ParamName); 15Assert.Equal(nameof(HttpLoggingAttribute.ResponseBodyLogLimit), ex.ParamName); 21var attribute = new HttpLoggingAttribute(HttpLoggingFields.None);
HttpLoggingEndpointConventionBuilderTests.cs (2)
30var metadata = endpoint.Metadata.GetMetadata<HttpLoggingAttribute>();