Trace without file name and line number in Haxe

Haxe has trace() , which can be used for all purposes to print content.

 trace("aa"); // Main.hx:89: aa 

How to print only contents, without file name and line number?

+8
source share
1 answer

For sys purposes (e.g. neko, php, cpp, java, cs):

Sys.println(message);

For other purposes, this depends on how you want to print the trace statement. For example, it can be configured for a JS target:

 haxe.Log.trace = function(msg, ?pos) js.Browser.window.console.log("trace: " + msg); trace("ok?"); //will log to the console: trace: ok? 
+11
source

All Articles