As suggested by this PR: #932
However, the solution is not by patching the generated file. This will not be sustainable. The solution is to apply a custom mapping for this function. However, the mapping scheme does not support variable-number arguments, so only the proposed single-string mapping will be available.
Workaround is to replace "%" in message text to "critical" etc. by "%%".