Request
Apache HTTP server logs are structured as the following:
172.21.0.1 - - [12/Jan/2021:15:52:42 +0000] "GET /js/ajax.js?v=5.0.4 HTTP/1.1" 200 8783 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
I would like to be able to define a log type with variables as follows:
<ip> -- <timestamp> "<request> <link> <protocol>" <response_code> <int> "-" "<accessor>"
and then define what each variable would encode in regex.
The benefit of specifying an entire log type is that it allows differentiating variables based on their placement in the Log Type.
For example, differentiating <response_code> ("200") and <int> ("8783") and not treating both as <int>.
Possible implementation