![]() |
Kale
|
Logging can be incredibly useful for debugging and figuring out what's wrong with your code. Unfortunately logging as a whole is somewhat more difficult in C++ over other languages such as Java or Javascript. Kale help's make logging easier by allowing you to log to both the standard output, and log files at the same time, along with printing the line number, file name, and other useful information. To log a custom type, simply create an operator overload to log it to std::ostream
. The types of logging functions are described below:
In release mode, logging is only enabled to the log files rather than to the standard output. All of the above functions print to both the standard output and the logging files in debug mode. Logging files can be found in .ApplicationName/logs/
where ApplicationName
is the name given in the constructor to application. All logging functions also are thread safe, they can be called from any thread without interloping or any unexpected behavior.