Store log messages in an array of messages.