There are times when I wish the RFC (Request For Comment)s had more examples that covered various corner cases, such as handling SMTP (Simple Mail Transport Protocol) [1] or even, you know, SIP (Session Initiation Protocol) [2]!
Ahem.
Anyway, while I'm here, let me also ask for a way to log everything but only when something is going to fail and skip the logging for stuff that won't fail (that just wastes space). How hard can that be?
[1] https://www.ietf.org/rfc/rfc5321.txt