Tag Archives: log format

8.2.1. Default log format

This log format is used when no specific option is set. The log is emitted as soon as the connection is accepted. One should note that this currently is the only format which logs the request’s destination IP and ports.

Example :

        listen www
            mode http
            log global
            server srv1
    >>> Feb  6 12:12:09 localhost haproxy[14385]: Connect from to (www/HTTP)
Field Format Extract from the example above
1 process_name '[' pid ']:' haproxy[14385]:
2 'Connect from' Connect from
3 source_ip ':' source_port
4 'to' to
5 destination_ip ':' destination_port
6 '(' frontend_name '/' mode ')' (www/HTTP)

Detailed fields description :

  • “source_ip” is the IP address of the client which initiated the connection.
  • “source_port” is the TCP port of the client which initiated the connection.
  • “destination_ip” is the IP address the client connected to.
  • “destination_port” is the TCP port the client connected to.
  • “frontend_name” is the name of the frontend (or listener) which received and processed the connection.
  • “mode is the mode the frontend is operating (TCP or HTTP).

In case of a UNIX socket, the source and destination addresses are marked as “unix:” and the ports reflect the internal ID of the socket which accepted the connection (the same ID as reported in the stats).

It is advised not to use this deprecated format for newer installations as it will eventually disappear.

Share Button