Log primarily provides the trace() method, which is invoked upon a call to trace() in Haxe code.

Static methods

@:hackstaticdynamicclear():Void

Available on flash

Clears the trace output.

@:keepstaticformatOutput(v:Dynamic, infos:PosInfos):String

Available on cpp, flash

Format the output of trace before printing it.

staticformatOutput(v:Dynamic, infos:Null<PosInfos>):String

Available on php, js, macro, jvm, hl, neko, lua, python

Format the output of trace before printing it.

@:hackstaticdynamicsetColor(rgb:Int):Void

Available on flash

Sets the color of the trace output to rgb.

@:keepstaticdynamictrace(v:Dynamic, ?infos:PosInfos):Void

Outputs v in a platform-dependent way.

The second parameter infos is injected by the compiler and contains information about the position where the trace() call was made.

This method can be rebound to a custom function:

var oldTrace = haxe.Log.trace; // store old function
haxe.Log.trace = function(v, ?infos) {
  // handle trace
}
...
haxe.Log.trace = oldTrace;

If it is bound to null, subsequent calls to trace() will cause an exception.