Add a class of writing the messages to log