Using memory for debug message logging