Log
Shared logging for Haxe and Rust libraries. Set level and sink on the app thread. By default Rust records are pulled after native calls and during Loop.sync; flush explicitly when an otherwise idle native worker can produce logs. No worker calls a Haxe sink. Logging does not keep an idle app alive.
Static fields
var level(get, set):LogLevelMaximum verbosity for both frontends and attached native libraries.
var sink:Null<(LogRecord) -> Void>Called on the logging thread. Exceptions are contained; null restores console output.
var enabled(default, null):(value:LogLevel) -> BoolChecks verbosity before preparing an expensive Haxe message.
var error(default, null):(message:Dynamic, ?target:String, ?pos:Null<PosInfos>) -> Voidvar warn(default, null):(message:Dynamic, ?target:String, ?pos:Null<PosInfos>) -> Voidvar info(default, null):(message:Dynamic, ?target:String, ?pos:Null<PosInfos>) -> Voidvar debug(default, null):(message:Dynamic, ?target:String, ?pos:Null<PosInfos>) -> Voidvar trace(default, null):(message:Dynamic, ?target:String, ?pos:Null<PosInfos>) -> Voidvar after(default, null):(value:T) -> TFlushes after a native call without allocating a callback around the call.
var boundary(default, null):() -> VoidA frame loop batches diagnostics at Loop.sync instead of polling after every call.
Static methods
function write(value:LogLevel, message:Dynamic, ?target:String, ?pos:Null<PosInfos>):VoidEmits an owned record; disabled messages are not converted to text.
function attach(setLevel:(Int) -> Void, take:() -> Null<Bytes>):BoolUsed by generated bindings; older bindings need no logging exports.
function flush():VoidDelivers one bounded batch per native source on the app's logging thread.