An ignored log object from Asciidoctor overwrites the message of the next log object from Asciidoctor
If a log object coming from Asciidoctor is ignored because it does not reach the severity threshold, the message from that log object gets used over the message from the next log object that is logged. This can lead to a situation where it appears as though the severity of an old message got elevated, and for the real log message to be dropped.
The problem is that the Ruby block attached to the $add
function must be cleared regardless of whether the message is processed. Otherwise, it hangs around for the next invocation.