Skip to content

Commit

Permalink
doc: add haproxy logging to stdout
Browse files Browse the repository at this point in the history
Add info on how to configure HAProxy to log to stdout.

Remove the line with v0.14 related info when merging to older versions.
  • Loading branch information
jcmoraisjr committed Jun 13, 2024
1 parent 7bd9908 commit a356aa4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/content/en/docs/configuration/keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -2746,6 +2746,12 @@ Logging configurations.
* `syslog-length`: The maximum line length, log lines larger than this value will be truncated. Defaults to `1024`.
* `syslog-tag`: Configure the tag field in the syslog header to the supplied string.

The HAProxy process can also send logs to stdout, instead of an external syslog endpoint or a syslog sidecar, by following the steps below:

* Configure `syslog-endpoint` as `stdout` and `syslog-format` as `raw`
* From v0.12 and newer, configure HAProxy to run as a sidecar, see the [example page]({{% relref "../examples/external-haproxy" %}})
* From v0.14 and newer, it is also possible to make embedded HAProxy send logs to the controller container by adding [`--master-worker`]({{% relref "command-line/#master-worker" %}}) command-line option - in this case, both controller and haproxy logs will share the same stream

See also:

* https://docs.haproxy.org/2.4/configuration.html#3.1-log
Expand Down

0 comments on commit a356aa4

Please sign in to comment.