#
Logging system
The logging system of Blueprint Utilities allows you to get rid of all the print string/print text in your project. Thanks to its centralized management in the project settings, you can control all your Log nodes at once. This new system also allows you to bring the power of C++ logs into your blueprint code, enabling you to create logs compatible with shipping builds without leaving blueprint.
#
The Log node
The Log node
has two static input pins. The first one is a FGameplayTag selector that represent the LogProfile associated to this node, and the second one is Message pin that contain the string to print.
Formatted messages
The Message
pin will transform any expression surounded with {}
into an argument pin.
#
Log profiles
To use this system properly you need to create some Log profiles
. Log profiles represent a logging behavior that you want to use in your project. Log profiles are represented by a name and a FGameplayTag
to allow you to assign them to each of your blueprint nodes with one click!
#
Other Settings
#
Log in shipping
Danger zone
Before enable log in shipping, ensure you are aware of what your doing. Log in shipping can lead to severe data leaks.
To log in shipping you need to use an Unreal Engine version From source
. See : Unreal Engine from source documentation. Then in your project’s Target.cs file add the following lines to force enable the log in shipping.
public class PluginSandboxProjectTarget : TargetRules
{
public PluginSandboxProjectTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V4;
BuildEnvironment = TargetBuildEnvironment.Unique;
bUseLoggingInShipping = true;
ExtraModuleNames.AddRange( new string[] { "PluginSandboxProject" } );
}
}
#
Example
Once you have finished setting up your log profiles, all that's left is to use the Log node in your project. Easy, isn't it? 😜