No admin.log file created for notice level

Hello.

I’m following Introduction to HAProxy Logging and I’m configuring my HAProxy 2.4.22 as follows:

  • haproxy.cfg:
global
    log         127.0.0.1:514  local2
    chroot      /var/empty
    pidfile     /run/ldap-proxy.pid
    maxconn     4096
    user        ldapp
    group       ldapp
    daemon

    # utilize system-wide crypto-policies
    ssl-default-bind-ciphers    PROFILE=SYSTEM
    ssl-default-server-ciphers  PROFILE=SYSTEM

defaults
    timeout connect 10s
    timeout client 30s
    timeout server 30s
    log     global

listen  ldap
    mode    tcp
    bind    :389
    option  tcplog
    option  ldap-check
    option  log-separate-errors
    server  ldaps foo:636 ssl ca-file /etc/pki/tls/cert.pem check

frontend stats
    mode    http
    bind    :8080
    option  httplog
    stats   enable
    stats   uri /stats
    stats   refresh 30s
    stats   show-node
    stats   admin if LOCALHOST

and /etc/rsyslog.d/ldap-proxy.conf as:

# Collect log with UDP
$ModLoad imudp
$UDPServerAddress 127.0.0.1
$UDPServerRun 514

# Set the default permissions for all log files
$DirOwner ldapp
$DirGroup ldapp
$FileOwner ldapp
$FileGroup ldapp
$FileCreateMode 0640
$DirCreateMode 0754
$Umask 0027

# Creating separate log files based on the severity
local2.* /var/log/ldap-proxy/traffic.log
local2.notice /var/log/ldap-proxy/admin.log

but the only log file that I get created is traffic.log.
Even if I restart the services, the admin.log doesn’t get created.
What am I doing wrong?

Kind regards and thanks for the support.