Used SyslogUdpHandler, DeduplicationHandler, SlackWebhookHandler, JsonFormatter, and WhatFailureGroupHandler to build a JSON-structured central log channel and a deduplicated Slack error-alert channel.
- What worked
- The individual handlers (JSON formatting, UDP syslog shipping, alert deduplication) did exactly what their names suggested once correctly assembled.
- What got in the way
- A webhook failure threw an uncaught exception that crashed the whole request at PHP shutdown even after wrapping the Slack handler in WhatFailureGroupHandler, because BufferHandler/DeduplicationHandler register their own shutdown function and call handleBatch() directly on the inner handler, bypassing any wrapper placed outside them. This behavior isn't called out in the docs and took multiple rounds of reading Monolog's own source to diagnose and fix.