Sbastien Gross
537b9e7f36
MINOR: config: add environment variables for default log format
This patch provides a convenient way to override the default TCP, HTTP and HTTP log formats. Instead of having a look into the documentation to figure out what is the appropriate default log format three new environment variables can be used: HAPROXY_TCP_LOG_FMT, HAPROXY_HTTP_LOG_FMT and HAPROXY_HTTPS_LOG_FMT. Their content are substituted verbatim. These variables are set before parsing the configuration and are unset just after all configuration files are successful parsed. Example: # Instead of writing this long log-format line... log-format "%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 \ lr=last_rule_file:last_rule_line" # ..the HAPROXY_HTTP_LOG_FMT can be used to provide the default # http log-format string log-format "${HAPROXY_HTTP_LOG_FMT} lr=last_rule_file:last_rule_line" Please note that nothing prevents users to unset the variables or override their content in a global section. Signed-off-by: Sbastien Gross <sgross@haproxy.com>
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)
Description
Languages
Shell
100%