Support for writing to the console