Added an internal logging mechanism for 4.2+