wrap debug log in a call to format