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: diff --git a/templates/etc/haproxy/haproxy-frontend.cfg.j2 b/templates/etc/haproxy/haproxy-frontend.cfg.j2 index c001e40..c105d38 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 }}