Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit 46f021d

Browse files
committed
Feedback
1 parent eb21f74 commit 46f021d

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/Microsoft.AspNetCore.ResponseCaching/Internal/LoggerExtensions.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,91 +50,91 @@ static LoggerExtensions()
5050
_logRequestWithAuthorizationNotCacheable = LoggerMessage.Define(
5151
logLevel: LogLevel.Debug,
5252
eventId: 2,
53-
formatString: $"The request cannot be served from cache because it contains an {HeaderNames.Authorization} header.");
53+
formatString: $"The request cannot be served from cache because it contains an '{HeaderNames.Authorization}' header.");
5454
_logRequestWithNoCacheNotCacheable = LoggerMessage.Define(
5555
logLevel: LogLevel.Debug,
5656
eventId: 3,
57-
formatString: "The request cannot be served from cache because it contains a no-cache cache directive.");
57+
formatString: "The request cannot be served from cache because it contains a 'no-cache' cache directive.");
5858
_logRequestWithPragmaNoCacheNotCacheable = LoggerMessage.Define(
5959
logLevel: LogLevel.Debug,
6060
eventId: 4,
61-
formatString: "The request cannot be served from cache because it contains a no-cache pragma directive.");
61+
formatString: "The request cannot be served from cache because it contains a 'no-cache' pragma directive.");
6262
_logExpirationMinFreshAdded = LoggerMessage.Define<TimeSpan>(
6363
logLevel: LogLevel.Debug,
6464
eventId: 5,
6565
formatString: "Adding a minimum freshness requirement of {Duration}.");
6666
_logExpirationSharedMaxAgeExceeded = LoggerMessage.Define<TimeSpan, TimeSpan>(
6767
logLevel: LogLevel.Debug,
6868
eventId: 6,
69-
formatString: "The age of the entry is {Age} and has exceeded the maximum age for shared caches of {SharedMaxAge} specified by s-maxage.");
69+
formatString: "The age of the entry is {Age} and has exceeded the maximum age for shared caches of {SharedMaxAge} specified by the 's-maxage' cache directive.");
7070
_logExpirationMustRevalidate = LoggerMessage.Define<TimeSpan, TimeSpan>(
7171
logLevel: LogLevel.Debug,
7272
eventId: 7,
73-
formatString: "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by max-age. It must be revalidated becauses must-revalidate is specified.");
73+
formatString: "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by the 'max-age' cache directive. It must be revalidated because the 'must-revalidate' cache directive is specified.");
7474
_logExpirationMaxStaleSatisfied = LoggerMessage.Define<TimeSpan, TimeSpan, TimeSpan>(
7575
logLevel: LogLevel.Debug,
7676
eventId: 8,
77-
formatString: "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by max-age. However, it satisfied the maximum stale allowance of {MaxStale} specified by max-stale.");
77+
formatString: "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by the 'max-age' cache directive. However, it satisfied the maximum stale allowance of {MaxStale} specified by the 'max-stale' cache directive.");
7878
_logExpirationMaxAgeExceeded = LoggerMessage.Define<TimeSpan, TimeSpan>(
7979
logLevel: LogLevel.Debug,
8080
eventId: 9,
81-
formatString: "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by max-age.");
81+
formatString: "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by the 'max-age' cache directive.");
8282
_logExpirationExpiresExceeded = LoggerMessage.Define<DateTimeOffset, DateTimeOffset>(
8383
logLevel: LogLevel.Debug,
8484
eventId: 10,
85-
formatString: $"The response time of the entry is {{ResponseTime}} and has exceeded the expiry date of {{Expired}} specified by the {HeaderNames.Expires} header.");
85+
formatString: $"The response time of the entry is {{ResponseTime}} and has exceeded the expiry date of {{Expired}} specified by the '{HeaderNames.Expires}' header.");
8686
_logResponseWithoutPublicNotCacheable = LoggerMessage.Define(
8787
logLevel: LogLevel.Debug,
8888
eventId: 11,
89-
formatString: "Response is not cacheable because it does not contain the public cache directive.");
89+
formatString: "Response is not cacheable because it does not contain the 'public' cache directive.");
9090
_logResponseWithNoStoreNotCacheable = LoggerMessage.Define(
9191
logLevel: LogLevel.Debug,
9292
eventId: 12,
93-
formatString: "Response is not cacheable because it or its corresponding request contains a no-store cache directive.");
93+
formatString: "Response is not cacheable because it or its corresponding request contains a 'no-store' cache directive.");
9494
_logResponseWithNoCacheNotCacheable = LoggerMessage.Define(
9595
logLevel: LogLevel.Debug,
9696
eventId: 13,
97-
formatString: "Response is not cacheable because it contains a no-cache cache directive.");
97+
formatString: "Response is not cacheable because it contains a 'no-cache' cache directive.");
9898
_logResponseWithSetCookieNotCacheable = LoggerMessage.Define(
9999
logLevel: LogLevel.Debug,
100100
eventId: 14,
101-
formatString: $"Response is not cacheable because it contains a {HeaderNames.SetCookie} header.");
101+
formatString: $"Response is not cacheable because it contains a '{HeaderNames.SetCookie}' header.");
102102
_logResponseWithVaryStarNotCacheable = LoggerMessage.Define(
103103
logLevel: LogLevel.Debug,
104104
eventId: 15,
105-
formatString: $"Response is not cacheable because it contains a {HeaderNames.Vary} header with a value of *.");
105+
formatString: $"Response is not cacheable because it contains a '{HeaderNames.Vary}' header with a value of *.");
106106
_logResponseWithPrivateNotCacheable = LoggerMessage.Define(
107107
logLevel: LogLevel.Debug,
108108
eventId: 16,
109-
formatString: "Response is not cacheable because it contains the private cache directive.");
109+
formatString: "Response is not cacheable because it contains the 'private' cache directive.");
110110
_logResponseWithUnsuccessfulStatusCodeNotCacheable = LoggerMessage.Define<int>(
111111
logLevel: LogLevel.Debug,
112112
eventId: 17,
113113
formatString: "Response is not cacheable because its status code {StatusCode} does not indicate success.");
114114
_logNotModifiedIfNoneMatchStar = LoggerMessage.Define(
115115
logLevel: LogLevel.Debug,
116116
eventId: 18,
117-
formatString: $"The content requested has not been modified. The {HeaderNames.IfNoneMatch} header of the request contains a value of *.");
117+
formatString: $"The content requested has not been modified. The '{HeaderNames.IfNoneMatch}' header of the request contains a value of *.");
118118
_logNotModifiedIfNoneMatchMatched = LoggerMessage.Define<EntityTagHeaderValue>(
119119
logLevel: LogLevel.Debug,
120120
eventId: 19,
121-
formatString: $"The content requested has not been modified. The ETag {{ETag}} in the {HeaderNames.IfNoneMatch} header matched the ETag of a cached entry.");
121+
formatString: $"The content requested has not been modified. The ETag {{ETag}} in the '{HeaderNames.IfNoneMatch}' header matched the ETag of a cached entry.");
122122
_logNotModifiedIfUnmodifiedSinceSatisfied = LoggerMessage.Define<DateTimeOffset, DateTimeOffset>(
123123
logLevel: LogLevel.Debug,
124124
eventId: 20,
125-
formatString: $"The content requested has not been modified. The last modified date of {{LastModified}} is before the date {{IfUnmodifiedSince}} specified in the {HeaderNames.IfUnmodifiedSince} header.");
125+
formatString: $"The content requested has not been modified. The last modified date of {{LastModified}} is before the date {{IfUnmodifiedSince}} specified in the '{HeaderNames.IfUnmodifiedSince}' header.");
126126
_logNotModifiedServed = LoggerMessage.Define(
127127
logLevel: LogLevel.Information,
128128
eventId: 21,
129129
formatString: "The content requested has not been modified.");
130130
_logCachedResponseServed = LoggerMessage.Define(
131131
logLevel: LogLevel.Information,
132132
eventId: 22,
133-
formatString: "Serving response from cache");
133+
formatString: "Serving response from cache.");
134134
_logGatewayTimeoutServed = LoggerMessage.Define(
135135
logLevel: LogLevel.Information,
136136
eventId: 23,
137-
formatString: "No cached response available for this request and the only-if-cached cache directive was specified.");
137+
formatString: "No cached response available for this request and the 'only-if-cached' cache directive was specified.");
138138
_logNoResponseServed = LoggerMessage.Define(
139139
logLevel: LogLevel.Information,
140140
eventId: 24,
@@ -154,7 +154,7 @@ static LoggerExtensions()
154154
_logResponseContentLengthMismatchNotCached = LoggerMessage.Define(
155155
logLevel: LogLevel.Warning,
156156
eventId: 28,
157-
formatString: $"The response could not be cached for this request because the {HeaderNames.ContentLength} did not match the body length.");
157+
formatString: $"The response could not be cached for this request because the '{HeaderNames.ContentLength}' did not match the body length.");
158158
}
159159

160160
internal static void LogRequestMethodNotCacheable(this ILogger logger, string method)

0 commit comments

Comments
 (0)