format
This commit is contained in:
@@ -13,45 +13,45 @@ class Log {
|
||||
private static var context:WindowContext;
|
||||
private static var writer:TermIO;
|
||||
|
||||
@:allow(kernel.Init)
|
||||
@:allow(kernel.Init)
|
||||
private static function init() {
|
||||
Log.context = WindowManager.instance.createNewContext();
|
||||
Log.writer = new TermIO(Log.context);
|
||||
}
|
||||
|
||||
private static function setMainoutout(newOutput: TermWriteable) {
|
||||
private static function setMainoutout(newOutput:TermWriteable) {
|
||||
writer = new TermIO(newOutput);
|
||||
}
|
||||
|
||||
public static function info(msg: Dynamic, ?pos:haxe.PosInfos){
|
||||
writer.writeLn("[INFO]["+pos.className+"]: "+Std.string(msg));
|
||||
public static function info(msg:Dynamic, ?pos:haxe.PosInfos) {
|
||||
writer.writeLn("[INFO][" + pos.className + "]: " + Std.string(msg));
|
||||
#if webconsole
|
||||
Debug.printWeb("[INFO]["+pos.className+"]: "+Std.string(msg));
|
||||
Debug.printWeb("[INFO][" + pos.className + "]: " + Std.string(msg));
|
||||
#end
|
||||
}
|
||||
|
||||
public static function warn(msg: Dynamic, ?pos:haxe.PosInfos){
|
||||
writer.writeLn("[WARN]["+pos.className+"]: "+Std.string(msg),Yellow);
|
||||
public static function warn(msg:Dynamic, ?pos:haxe.PosInfos) {
|
||||
writer.writeLn("[WARN][" + pos.className + "]: " + Std.string(msg), Yellow);
|
||||
#if webconsole
|
||||
Debug.printWeb("[WARN]["+pos.className+"]: "+Std.string(msg));
|
||||
Debug.printWeb("[WARN][" + pos.className + "]: " + Std.string(msg));
|
||||
#end
|
||||
}
|
||||
|
||||
public static function error(msg: Dynamic,?pos:haxe.PosInfos) {
|
||||
writer.writeLn("[ERRO]["+pos.className+"]: "+Std.string(msg),Red);
|
||||
public static function error(msg:Dynamic, ?pos:haxe.PosInfos) {
|
||||
writer.writeLn("[ERRO][" + pos.className + "]: " + Std.string(msg), Red);
|
||||
#if webconsole
|
||||
Debug.printWeb("[ERRO]["+pos.className+"]: "+Std.string(msg));
|
||||
Debug.printWeb("[ERRO][" + pos.className + "]: " + Std.string(msg));
|
||||
#end
|
||||
}
|
||||
|
||||
public static function debug(msg: Dynamic,?pos:haxe.PosInfos) {
|
||||
writer.writeLn("[DEBG]["+pos.className+"]: "+Std.string(msg),Gray);
|
||||
public static function debug(msg:Dynamic, ?pos:haxe.PosInfos) {
|
||||
writer.writeLn("[DEBG][" + pos.className + "]: " + Std.string(msg), Gray);
|
||||
#if webconsole
|
||||
Debug.printWeb("[DEBG]["+pos.className+"]: "+Std.string(msg));
|
||||
Debug.printWeb("[DEBG][" + pos.className + "]: " + Std.string(msg));
|
||||
#end
|
||||
}
|
||||
|
||||
public static function moveToOutput(addr: String) {
|
||||
WindowManager.instance.focusContextToOutput(context,addr);
|
||||
public static function moveToOutput(addr:String) {
|
||||
WindowManager.instance.focusContextToOutput(context, addr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user