DiscussionTools currently has a somewhat frequent exception (T343859) that recently had some details added:
- throw new LogicException( "Database can't find our row and won't let us insert it" ); + throw new NormalizedException( + "Database can't find our row and won't let us insert it on page {page} revision {revision}", + [ + 'page' => $rev->getPageId(), + 'revision' => $rev->getId(), + ] + );
On the face of it, this is a textbook use of NormalizedException. However, the result in logspam-watch looks like this:
It looks like logspam-watch is using the unnormalized message instead of the normalized message, thus negating the benefit of message normalization: there’s a wall of similar but different messages with low hit counts, rather than a single entry with an aggregate hit count.
This might be limited to this particular exception (though I don’t know how or why) – notice that the DBTransactionSizeError in the screenshot shows a normalized message. (That class is also implemented using the NormalizedException library, but using INormalizedException + NormalizedExceptionTrait instead of the NormalizedException class…)