Code tidy for message logging.