fix logging function (Fixes #81656932)