I’m wondering whether it’s possible to capture logs from my hud (scaleform) while running the game.
My hud has become a very large application by itself, and occasionally it will run into bugs. However it simply fails silently (often recovering fine). But I’d love to view the error logs to see what runtime errors are occurring.
If that doesn’t help I’m afraid you’ll have to do some research and roll a custom solution yourself. One idea could be to catch any errors/exceptions occurring (ideally prevent them from happening at all in the first place) and send the message string to an unreal function and do the logging from there.
Yeah that’s what I’ve been doing so far. However my hud (flash) application is so huge now, with so many variables an interactions with UnrealScript, that I’m sure there are runtime errors occurring during gameplay that are not caught in the isolated testing with the dummy data. It would just be so nice if I had errors being written to log files at runtime (in engine).
try
{
// All your code goes here
}
catch (error:*)
{
throw MyError; // Catch any other error.
// And call your log function.
}
…to “catch 'em all.” You wrap a try statement around all the code in every function, then put a catch right below it that write the name of the function to your log. It won’t be very specific or helpful at first, but if you at least log the name of the function causing the error, then it will let you know where to look and when.
I’ve been using the in-built logging by adding Suppress=DevGFxUI to my config files.
It’s great for seeing when errors are occurring, but not where they’re occurring.
All I see in the logs is:
DevGFxUI: TypeError: Error #1009
I would love it if there was some way of logging the filename and line-number. It is a real pain to actually trace down where exactly the errors are occurring.