From ebd9709c3df4046c427cfc1c26f20343cacb7bfb Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Thu, 24 Feb 2022 02:06:50 +0100 Subject: [PATCH] added networkID to webconsole log --- src/kernel/Log.hx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/kernel/Log.hx b/src/kernel/Log.hx index a486939..40ca320 100644 --- a/src/kernel/Log.hx +++ b/src/kernel/Log.hx @@ -4,6 +4,7 @@ import kernel.ui.WindowContext; import kernel.ui.WindowManager; import lib.TermWriteable; import lib.TermIO; +import kernel.net.Net; import util.Debug; /** @@ -26,28 +27,28 @@ class Log { 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("["+Net.instance.networkID+"][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); #if webconsole - Debug.printWeb("[WARN][" + pos.className + "]: " + Std.string(msg)); + Debug.printWeb("["+Net.instance.networkID+"][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); #if webconsole - Debug.printWeb("[ERRO][" + pos.className + "]: " + Std.string(msg)); + Debug.printWeb("["+Net.instance.networkID+"][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); #if webconsole - Debug.printWeb("[DEBG][" + pos.className + "]: " + Std.string(msg)); + Debug.printWeb("["+Net.instance.networkID+"][DEBG][" + pos.className + "]: " + Std.string(msg)); #end }