Added the ability to log messages.