Log

Log

package haxe

Available on all platforms

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

Static methods

static dynamic clear ():Void

Available on flash, js

Clears the trace output.

static dynamic setColor (rgb:Int):Void

Available on flash

Sets the color of the trace output to rgb.

static dynamic trace (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.

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/haxe/Log.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部