logging – Haproxy: Log only faulty requests (http: 4xx, 5xx)

I am currently adding rate limiting to http and mqtt services in haproxy. These are working, but I also want to show the blocked requests in the logs. On the http frontend I return a 429 and on the mqtt I close the connection on blocked requests.

But when I enable logs, ALL logs are shown.

global
    log 127.0.0. local notice

defaults
    log global
    option httplog
    

frontend public-https
    log stdout format short daemon warning

listen mqtt:
    mode tcp
    option tcplog
    log stdout format short daemon warning

How can I only show faulty requests, i.e. all 4xx and 5xx requests on http and all blocked connections on mqtt?