arturobernalg opened a new pull request, #1172: URL: https://github.com/apache/tomcat/pull/1172
Adds a `minRequestDuration` attribute, in milliseconds, to the access log valves (`AccessLogValve`, `ExtendedAccessLogValve` and `JsonAccessLogValve`). Requests that take less time are not logged, so a second access log valve can be used to keep a log of only the slow requests. A request that takes exactly the configured time is logged. The default of `0` logs every request, as before. The check uses the time that is already passed to `log()`, in nanoseconds, and is done before anything is formatted, so skipped requests cost almost nothing. It is applied in addition to `conditionIf` and `conditionUnless`, which cannot filter on the duration without a custom filter that sets a request attribute. A negative value is rejected. Tests: `TestAccessLogValveMinRequestDuration`, which passes the time to the valve so it does not have to wait, and the existing access log tests. Also run against a running Tomcat with a normal and a slow access log, HTTP/1.1 and HTTP/2, async requests, 404 and 500 responses, comparing with main. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
