From eec041a8476b3b4fc0a5a5bf8bc08b846e35901e Mon Sep 17 00:00:00 2001 From: dricoco <6524436+dricoco@users.noreply.github.com> Date: Fri, 27 Jan 2023 13:58:58 +0100 Subject: [PATCH 1/3] Update haproxy-frontend.cfg.j2 --- templates/etc/haproxy/haproxy-frontend.cfg.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/etc/haproxy/haproxy-frontend.cfg.j2 b/templates/etc/haproxy/haproxy-frontend.cfg.j2 index c001e40..dfaa207 100644 --- a/templates/etc/haproxy/haproxy-frontend.cfg.j2 +++ b/templates/etc/haproxy/haproxy-frontend.cfg.j2 @@ -85,6 +85,11 @@ frontend {{ name }} redirect {{ redirect }} {% endfor %} {% endif %} + {% if value.log_formats is defined %} + {% for log_format in value.log_formats %} + log_format {{ log_format }} + {% endfor %} + {% endif %} {% if value.logs is defined %} {% for log in value.logs %} log {{ log }} From 48677692caa8532b0d8c6b4ef891d98f5ebfac4a Mon Sep 17 00:00:00 2001 From: dricoco <6524436+dricoco@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:06:10 +0100 Subject: [PATCH 2/3] Update haproxy-frontend.cfg.j2 --- templates/etc/haproxy/haproxy-frontend.cfg.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/etc/haproxy/haproxy-frontend.cfg.j2 b/templates/etc/haproxy/haproxy-frontend.cfg.j2 index dfaa207..c105d38 100644 --- a/templates/etc/haproxy/haproxy-frontend.cfg.j2 +++ b/templates/etc/haproxy/haproxy-frontend.cfg.j2 @@ -87,7 +87,7 @@ frontend {{ name }} {% endif %} {% if value.log_formats is defined %} {% for log_format in value.log_formats %} - log_format {{ log_format }} + log-format {{ log_format }} {% endfor %} {% endif %} {% if value.logs is defined %} From e186e5d071bfc096e41e3612ff2c59b3557f91ca Mon Sep 17 00:00:00 2001 From: dricoco <6524436+dricoco@users.noreply.github.com> Date: Fri, 27 Jan 2023 16:04:05 +0100 Subject: [PATCH 3/3] Update README.md adding example of log-format --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 88e23a4..47d1bda 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,8 @@ haproxy_frontend: - url_static path_end -i .jpg .gif .png .css .js bind_process: - 1 + log_formats: + - "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r" use_backends: - static if url_static capture: