Hi Nathan,

On Tue, Aug 13, 2024 at 06:34:00PM +0000, Nathan Wehrman wrote:
> 
> Hello,
> 
> For your consideration I wrote and tested a new a logging format that will
> allow tcp mode proxies to send logs that will adhere to clf (common log
> format).
> This will allow the sending of that data to servers that expect that format
> so it can be parsed but the connections will stand out as TCP.
> To accomplish that I used this log-format string:
> 
> log-format "%{+Q}o %{-Q}ci - - [%T] \"TCP \" 000 %B \"\" \"\" %cp %ms %ft %b
> %s %Th %Tw %Tc %Tt %U %ts-- %ac %fc %bc %sc %rc %sq %bq \"\" \"\" "
> 
> The HTTP request has been replaced with "TCP " and the response code has
> been hard coded to "000".
> 
> I also added a couple of very minor spacing changes.
> 
> The patch file is attached.

Looks good overall, and even if I don't use CLF myself, I obviously have
no objection to this minor change. I fixed two tiny ident issues (one on
a variable declaration and one in a condition) and changed the tag from
MEDIUM to MINOR since it really has no theoretical impact on existing
features, and I've applied it.

I've been wondering why we don't have the CLF equivalent variables for
tcp/http logs (e.g. HAPROXY_HTTP_LOG_FMT), and I suspect that it's simply
because they're less often used. I don't know if there could be any
interest in having the equivalent ones declared for CLF (http/tcp) or
not. Since this is only pure convenience, it's always difficult to guess
whether some users would really benefit from this.

Thanks!
Willy


Reply via email to