replace log with addmessage