Adde message formatting and logging.