trace can now be used in debug mode
This commit is contained in:
parent
d13831f213
commit
5925f851c4
2
Makefile
2
Makefile
@ -22,7 +22,7 @@ UNPACK_POLYFILLED_PATH := $(BUILD_DIR)/$(UNPACK_POLYFILLED_NAME)
|
|||||||
|
|
||||||
all: clean build unpack
|
all: clean build unpack
|
||||||
|
|
||||||
build: HAXE_FLAGS += -D analyzer-optimize
|
build: HAXE_FLAGS += -D analyzer-optimize --no-traces
|
||||||
build: $(MIN_PATH)
|
build: $(MIN_PATH)
|
||||||
|
|
||||||
debug: HAXE_FLAGS += -D webconsole -D error_stack --debug
|
debug: HAXE_FLAGS += -D webconsole -D error_stack --debug
|
||||||
|
@ -21,6 +21,12 @@ class Log {
|
|||||||
@:allow(kernel.Init)
|
@:allow(kernel.Init)
|
||||||
private static function init() {
|
private static function init() {
|
||||||
onLog = onLogTrigger.asSignal();
|
onLog = onLogTrigger.asSignal();
|
||||||
|
|
||||||
|
#if debug
|
||||||
|
haxe.Log.trace = function(v:Dynamic, ?infos:haxe.PosInfos) {
|
||||||
|
Log.debug(v, infos);
|
||||||
|
}
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function info(msg:Dynamic, ?pos:haxe.PosInfos) {
|
public static function info(msg:Dynamic, ?pos:haxe.PosInfos) {
|
||||||
|
Loading…
Reference in New Issue
Block a user