Due to the lack of a true cross-platform logging mechanism in C++, cerlib provides its own.
Example:
cer::logInfo("Hello {}! Let's count: {}, {}, {}",
"World", 1, 2, 3);
// Output: Hello World! Let's count: 1, 2, 3
cerlib’s logging mechanism respects the target platform, for example:
- Logs to the Visual Studio output window in Visual Studio
- Logs to Android Logcat on Android
- Logs to
stdout
(i.e. terminal) on other platforms
Logging functions
Function 197_2cd819-8d> |
Description 197_9915e7-af> |
---|---|
|
Logs a normal message to the system output, indicating a status update. 197_53e2ce-49> |
|
Logs a warning to the system output, indicating that the developer should pay attention to some operation that was just performed. 197_60d289-07> |
|
Logs an error to the system output, indicating that the developer should fix a bug in the game. 197_f56b2a-ce> |
|
Logs a normal message to the system output only in debug mode. In a release build, this is optimized away by the compiler and results in a no-op. 197_51966e-20> |
|
Logs a normal message to the system output only in debug mode and only if the |