8 instantiations of HttpLoggingAttribute
Microsoft.AspNetCore.HttpLogging (1)
HttpLoggingEndpointConventionBuilderExtensions.cs (1)
26
var metadata = new
HttpLoggingAttribute
(loggingFields);
Microsoft.AspNetCore.HttpLogging.Tests (7)
HttpLoggingAttributeTests.cs (3)
11
var ex = Assert.Throws<ArgumentOutOfRangeException>(() => new
HttpLoggingAttribute
(HttpLoggingFields.None) { RequestBodyLogLimit = -1 });
14
ex = Assert.Throws<ArgumentOutOfRangeException>(() => new
HttpLoggingAttribute
(HttpLoggingFields.None) { ResponseBodyLogLimit = -1 });
21
var attribute = new
HttpLoggingAttribute
(HttpLoggingFields.None);
HttpLoggingMiddlewareTests.cs (4)
2031
endpoint.MapGet("/attr_responseonly", [
HttpLogging
(HttpLoggingFields.Response)] async (HttpContext c) =>
2043
endpoint.MapGet("/attr_responseandrequest", [
HttpLogging
(HttpLoggingFields.All)] async (HttpContext c) =>
2056
endpoint.MapGet("/attr_restrictedheaders", [
HttpLogging
((HttpLoggingFields.Request & ~HttpLoggingFields.RequestScheme) | (HttpLoggingFields.Response & ~HttpLoggingFields.ResponseStatusCode))] async (HttpContext c) =>
2068
endpoint.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)
26
var
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)
58
var
loggingAttribute = context.GetEndpoint()?.Metadata.GetMetadata<
HttpLoggingAttribute
>();
71
HttpLoggingAttribute
? loggingAttribute, HttpLoggingFields loggingFields)
Microsoft.AspNetCore.HttpLogging.Tests (5)
HttpLoggingAttributeTests.cs (3)
12
Assert.Equal(nameof(
HttpLoggingAttribute
.RequestBodyLogLimit), ex.ParamName);
15
Assert.Equal(nameof(
HttpLoggingAttribute
.ResponseBodyLogLimit), ex.ParamName);
21
var
attribute = new HttpLoggingAttribute(HttpLoggingFields.None);
HttpLoggingEndpointConventionBuilderTests.cs (2)
30
var
metadata = endpoint.Metadata.GetMetadata<
HttpLoggingAttribute
>();