jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Issue #9980 - add additional codes for CustomRequestLog

Open lachlan-roberts opened this issue 1 year ago • 3 comments

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

lachlan-roberts avatar Sep 27 '24 06:09 lachlan-roberts

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/`)

joakime avatar Oct 02 '24 16:10 joakime

I agree with @joakime as long as we have also %{host}uri and %{port}uri.

sbordet avatar Oct 02 '24 16:10 sbordet

I have added the changes requested.

Note that there are now some duplicate codes:

%U - %{path}uri
%q - %{query}uri

lachlan-roberts avatar Oct 09 '24 11:10 lachlan-roberts