Changed the way logging is performed.