Skip to content
Cauê Waneck edited this page Apr 2, 2018 · 3 revisions

Haxe trace will call UE_LOG, so you can just use trace:

trace("SomeValue") is the same as UE_LOG(HaxeLog,Log,TEXT("SomeValue")) You can also trace multiple values: trace("SomeValue", someObject, someString)

Warnings and Errors

For warnings and errors, you can use the following code:

trace("Warning", "SomeValue");
trace("Error", "SomeError");
trace("Fatal", "SomeError"); // use this only if the error is not recoverable

Using Log Categories

You can define your own log category by using unreal.LogCategory:

static var SomeCategory = unreal.LogCategory.get("LogSomething");

// snip ...

trace('Error', SomeCategory, "Some Category error");
trace(SomeCategory, "Some Category log");