Console
From Nocturnal.insomniacgames.com
Download
http://nocturnal.insomniacgames.com/releases/Console
Console
Console is basically a wrapper around, and alternative for, printf(). It can log its output to a trace file, and it color codes printing to the Windows Command Prompt based on what kind of print statement is made. Each one of the printing statements also take a verbosity level.
void Function() { Console::Print("Function() is executing!\n"); Console::Warning("Function() has encountered a warning!\n"); Console::Error("Function() has encountered an error!\n"); }
This will output:
Function() is executing! Function() has encountered a warning! Function() has encountered an error!
Alternatively, Console supports task outlining:
void Function2() { Console::Bullet bullet ("Doing Function2\n"); } void Function1() { Console::Bullet bullet ("Doing Function1\n"); Function2(); Function2(); }
This will output:
o Doing Function1 - Doing Function 2 - Doing Function 2
This helps to outline to the user the context in which work is done. Console also saves this outline state as a global. If the Debug library encounters a fatal exception, it includes this outline state in its report, so you have more information about what the program was doing when it encountered the exception and terminated. Bullets also work well with C++ exceptions because the bullets are stack allocated.
