Consistently log Class.getName() instead of Class.toString(), avoiding double class term in log message

Issue: SPR-11804
(cherry picked from commit 1120680)