You can find the details of the logging system in the documentation, section 8 [1].
As an example, here is a basic logging configuration:
global
log 127.0.0.1 syslog debug
defaults
log global
mode http
option httplog
[1] https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#8