This plugin captures UE_LOG(LogTemp) and Blueprint Print String (if logging enabled) based logs at runtime to store and visualize them. It won't work on editor only logs.
Runtime Logger Engine Subsystem: It is responsible for log management and automatically attaches FOutputDevice to catch logs that come from UE_LOG(LogTemp) and/or Print String at runtime.
Because Deinitialize() and BeginDestroy (inherited from UObject) functions of UGameInstanceSubsystem run before actual shutdown and prematurely clean log file buffer. If project has a log that comes from EndPlay event, system re-open that buffer again and this causes multiple log files.
UEngineSubsystem has two benefits.
- Level changes can't affect it.
- While you are in editor, each
playsession doesn't open a new file but use existing one. System cleans log file only when you close the engine or your packaged project.
- You don't have to do something special. Just enable plugin from your editor's
Pluginswindow and that's all. System automatically changes your defaultFOutputDevicewith our custom one and starts to catch
UE_LOG(LogTemp, Warning, TEXT("YOUR_AWASOME_LOG"))
and
Blueprint Print String (if logging enabled, because it uses an internal UE_LOG(LogBlueprintUserMessages))
based logs additional to appearing on Output Window.
- How can you visualize them depends on your imagination. You can look at plugin's
Contentfolder for a sample. - To access log database and log management functions, just get RuntimeLogger Engine Subystem from blueprints and call
ResetLogs,GetLogDb,GetLogFilePath,GetLog,MemoryToJson_BP - There are two UPROPERTYs that named as
bAllowSameMessageandSameMessageInterval. If disablebAllowSameMessage (default disabled), it won't record same message (message and verbosity should be the same) that comes within specified interval. - When your log captured, our system will automatically add an
UE5 FGUID based UUID,FDateTime::Now() based LogTime, and itsVerbosity levelto thatJSON.
- Other
Log CategoriesthanLogTempandLogBlueprintUserMessageswon't be captured. Because engine's itself logs every thing internally and we want to capture only developer's logs. - We also added a blueprint exposed function that named as
Log Message. Its message acceptsFJsonObjectWrapper. Because when your project groves, single sentenced logs won't be enough and you have to add other informations likePlugin or Module Name,Function Name,Detailsand etc. In that case,JSONgives us more tidy logs.
If you are C++ developer (It won't work on blueprints.) , we suggest you to use__FUNCTION__parameter. Because it automatically adds function and its owner class' name. It is a compiler feature fromMSVC. Sample Use Case:
FJsonObjectWrapper Log_Json;
Log_Json.JsonObject->SetStringField("FunctionName", FString(ANSI_TO_TCHAR(__FUNCTION__)));
Output Log: "{"FunctionName": "YourClass:YourFunction"}
You have three options.
-
Widget Method: If you will look at plugin's content folder, you can see some sample Widgets. They are blueprint exposed C++ widgets. So, you can add other components and change their styles based on your needs as long as you protect their current components and their names. Just delete
Spawn Actor Classfrom sample blueprint actor (it use our in house third part window system.) and addUI_RL_Viewportto viewport. When you log something, you can see it. That's all. -
File Method: You can see a new file created at
Project/Saved/like thisProjectName_RuntimeLogger_DATE-TIME.log. It is json based but While your project running, it doesn't have JSON ending]}to allow adding new entries. So you must mannualy append them at the end, if you want to use it before the game closes. - Upon closing, the function automatically appends them. -
Delegate Method: There is a delegate for captured logs. You can use them for additional purposes. For example your own widget system, mail sender, API connections and etc.
We haven't used any platform specific code. So it should work on any platform. But we tested it only on Windows and Android platforms. We don't have other OS.
It works on editor and packaged runtime but doesn't work on editor only side.
No UE4 or older versions are supported.
Only the latest Unreal Engine version is supported.
Updates will be provided about one month after a new major release.