Fixing misuse of log handler registration API.