Project Logs

Doing a lot with random generation and I’m finding quite a few situations where the result is not correct, however the circumstances are very ambiguous. Using breakpoints and looking at values simply is not a viable option. If I could log events to a text file on my hard drive that I could review later, it would be incredibly helpful.

I see that when you use the “Print String” in blueprints, there’s an option to “Print to Log” which sounds like exactly what I want, but I don’t know where this gets saved to (or if it’s saved at all).

I found the Project Logs, but this only seems to appear sporadically. For example, I just ran my project in the editor, but the “\Documents\Unreal Projects\MyProject\Saved\Logs” location doesn’t have any new files. And the files that are there don’t appear to contain any output from “Print String” functions.

EDIT:
Ok, I found that after I close the editor. the logs are saved to the folder and it contains my logged stuff. So I guess I found them. Is there any way to save these WITHOUT closing the editor? I need to be able to see this log while the game is still running, even if it’s incomplete. I need to compare what was logged to what is seen in the game.

I should have been more specific. I’m in the “Logs” folder and sorting by “Date Modified”. It does not update after the game is launched. I will search through a couple of them to see if I can find something that should have been logged from the blueprints.

Have you searched the existing logfiles for your prints? Try searching the latest one. It could be, that he doesn’t create a new one everytime you click on play, but just continues the last one. I guess he only creates a new one if you restart the editor.

I guess you could make a C++ function that writes into a textfile at runtime. (:

Make it BlueprintCallable with a String Parameter and you can use it inside your BP.

Hm. I haven’t touched the C++ stuff yet (though I have a bit of experience with C++).

The thing is, you will run into things like this often and it’s very easy to write functions in c++ and make them BP usable. I guess you can make a setup for your Logging that helps you looking into things much better than using the logging system of UE4.