Telkin
Loading...
Searching...
No Matches
Print Logging

Telkin provides wrapper functions for the OS logging API which automatically include the source file and line number of the call. The formatting is the same as the standard printf function.

Example:

#include <telkin/Print.h>
void main() {
tk::println("Hello world!");
}
void println(internal::LogFormat format, Args &&... args)
Definition Print.h:45

Results in:

[Main.cpp:4] Hello world!
Note
The file name is automatically truncated at compile-time so build paths are not leaked in the binary.

A tk::fatal function is also provided for fatal errors, which will immediately halt the application and display an error message on-screen.

See include/telkin/Print.h for more information.