Support for printing diagnostic messages to the console.