Skip to content

Commit

Permalink
Merge pull request #66 from Oefenweb/pr-62
Browse files Browse the repository at this point in the history
Move log-format to correct section
  • Loading branch information
tersmitten authored Oct 9, 2017
2 parents f894fd3 + 2cb6771 commit 0579712
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_global_log.{n}.facility`: [required]: Must be one of the 24 standard syslog facilities (e.g. `local0`, `local1`)
* `haproxy_global_log.{n}.level`: [optional]: Can be specified to filter outgoing messages (e.g. `notice`)
* `haproxy_global_log.{n}.minlevel`: [optional]: Can be specified to filter outgoing messages (e.g. `notice`)
* `haproxy_global_log.{n}.format`: [optional]: Specifies the log format string to use for traffic logs (e.g. `%{+Q}o\ %t\ %s\ %{-Q}r`)
* `haproxy_global_log.{n}.length`: [optional]: Can be specified to adjust message length in log (e.g. `2048`)
* `haproxy_global_chroot`: [optional]: Changes current directory to `<jail dir>` and performs a `chroot()` there before dropping privileges
* `haproxy_global_stats`: [default: See `defaults/main.yml`]: Stats declarations
Expand Down Expand Up @@ -49,6 +48,7 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_global_peers.{n}.peers.{n}.listen`: [required]: IP and port for peer to listen/connect to (e.g. `192.168.0.1:1024`)

* `haproxy_defaults_log`: [default: `global`]: Enable per-instance logging of events and traffic. `global` should be used when the instance's logging parameters are the same as the global ones. This is the most common usage
* `haproxy_defaults_logformat`: [optional]: Allows you to customize the logs in http mode and tcp mode (e.g. `%{+Q}o\ %t\ %s\ %{-Q}r`)
* `haproxy_defaults_mode`: [default: `http`]: Set the running mode or protocol of the instance
* `haproxy_defaults_source`: [optional]: Set the source address or interface for connections from the proxy
* `haproxy_defaults_option`: [default: `[httplog, dontlognull]`]: Options (default)
Expand Down
4 changes: 4 additions & 0 deletions templates/etc/haproxy/defaults.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
log {{ haproxy_defaults_log }}
{% endif %}

{% if haproxy_defaults_logformat is defined %}
log-format {{ haproxy_defaults_logformat }}
{% endif %}

{% if haproxy_defaults_mode != false %}
mode {{ haproxy_defaults_mode }}
{% endif %}
Expand Down
3 changes: 0 additions & 3 deletions templates/etc/haproxy/global.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
{% for log in haproxy_global_log %}
log {{ log.address }}{% if log.length is defined %} len {{log.length }}{% endif %} {{ log.facility }}{% if log.level is defined %} {{log.level }}{% endif %}{% if log.minlevel is defined %} {{ log.minlevel }}{% endif %}

{% if log.format is defined %}
log-format {{ log.format }}
{% endif %}
{% endfor %}
{% endif %}

Expand Down

0 comments on commit 0579712

Please sign in to comment.