title: Haproxy not logging with rsyslog
body: <p>I want to setup HTTP logging in HAProxy and am having some trouble getting it to output the requests correctly. </p>
  
  <p>Here is the HAProxy relevent configuration:</p>
  
  <pre><code>global
      log /dev/log    local0
      log /dev/log    local1 notice
      maxconn 200000
      tune.ssl.default-dh-param 2048
      user haproxy
      group haproxy
      daemon
      stats socket /tmp/sock1 user root group root mode 777 level admin
  
  defaults
      log    global
      mode    http
      option    httplog
      option    dontlognull
          option httpclose
      retries    3
      option redispatch
      maxconn    200000
      backlog 20000
      timeout connect    5s
      timeout client    50s
      timeout server    180000
      balance    roundrobin
      cookie    SERVERID rewrite 
  </code></pre>
  
  <p>Here is the /etc/rsyslog.d/haproxy.conf file:</p>
  
  <pre><code># Create an additional socket in haproxy's chroot in order to allow logging via
  # /dev/log to chroot'ed HAProxy processes
  $AddUnixListenSocket /var/lib/haproxy/dev/log
  
  # Send HAProxy messages to a dedicated logfile
  if $programname startswith 'haproxy' then /var/log/haproxy.log
  &amp;~ 
  </code></pre>
  
  <p>I've restarted both haproxy and rsyslogd after making the proper changes to make sure that they were picked up. The /var/log/haproxy.log isn't even being created. Any help would be appreciated.</p>