Make the drawing code capable of writing debugging logs.