jetty.project
jetty.project copied to clipboard
Issue #9980 - add additional codes for CustomRequestLog
Adds the following options to the CustomRequestLog
%A - the Request authority (which might differ from the Host header).
%h - the Request scheme
%uri - the entire Request HttpURI (including query)
%{q}uri - the entire Request HttpURI (excluding query)
%{attributeName}attr - a request attribute
Let me know if you can think of better codes for these.
closes #9980
Can request scheme be %S instead?
Or perhaps enhance the param portion of %{param}uri to work with the parts of the uri?
like ...
%uri = entire request URI
%{-query}uri = entire request URI (sans query)
%{scheme}uri = scheme of request URI
%{authority}uri = authority of request URI
%{path}uri = path of request URI
%{query}uri = query of request URI
%{-path,-query}uri = request URI without path or query (so just `scheme://authority/`)
I agree with @joakime as long as we have also %{host}uri and %{port}uri.
I have added the changes requested.
Note that there are now some duplicate codes:
%U - %{path}uri
%q - %{query}uri