fix deprecated logging in the modlib.php