Dedicated API
There is a dedicated API for accessing the console log. Note that the functions are defined in libTEMUConsole.so.
This API does not work on macOS.
// Include the Console API
#include "temu-c/Models/Console.h"
// These functions are defined in libTEMUConsole.so
uint64_t temu_consoleGetLineCount(void *Con);
const char* temu_consoleGetLine(void *Con, uint64_t Line);