Genvid Forum

Genvid Technologies

How to add game log in Tutorial.cpp?


#1

I want to add some log-output for debugging Tutorial.cpp (cube example) .
Ideally I want to see game logs in SDK monitor’s Logs tab > game .

When I add std::cout but it is not coming up in game log.

std::cout << “foobar¥n”

I expected to have Genvid_PrintLog or some API but not found.

What are the best practice here?

side node: when I search “logging” in forum, every SDK release notes are hit, but no “logging” keyword in them…


#2

Tutorial basically just capture stderr for the logs. So, replacing it with std::cerr should work.
If you want to capture stdout also, you can do so. See the section about logs under game.hcl.