-
Notifications
You must be signed in to change notification settings - Fork 43
Logging
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)
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
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");