X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Futil%2FLog.java;h=de7fe8dbc9523f6caedb95787d6a50c88872a27f;hp=2046b77c643c482bffb8054a597e321fd643b61f;hb=01732f3955ae92c0520283b44f52d1ec69f9f9f2;hpb=4abd3e305d0b87f37d5969016b86ba53574a3210 diff --git a/src/org/ibex/util/Log.java b/src/org/ibex/util/Log.java index 2046b77..de7fe8d 100644 --- a/src/org/ibex/util/Log.java +++ b/src/org/ibex/util/Log.java @@ -15,6 +15,7 @@ import java.net.*; public class Log { public static boolean on = true; + public static boolean rpc = false; public static boolean color = false; public static boolean verbose = false; public static boolean logDates = false; @@ -77,7 +78,10 @@ public class Log { if (firstMessage && !logDates) { firstMessage = false; logstream.println(colorize(GREEN, false, "===========================================================================")); - diag(Log.class, "Logging enabled at " + new java.util.Date()); + + // FIXME later: causes problems with method pruning + //diag(Log.class, "Logging enabled at " + new java.util.Date()); + if (color) diag(Log.class, "logging messages in " + colorize(BLUE, true, "c") + colorize(RED, true, "o") + @@ -126,14 +130,16 @@ public class Log { try { String m = ""; while((s = br.readLine()) != null) m += s + "\n"; - log(o, m.substring(0, m.length() - 1), level); + if (m.length() > 0) log(o, m.substring(0, m.length() - 1), level); } catch (IOException e) { logstream.println(colorize(RED, true, "Logger: exception thrown by ByteArrayInputStream -- this should not happen")); } + lastClassName = ""; return; } String str = message.toString(); + if (str.indexOf('\n') != -1) lastClassName = ""; while(str.indexOf('\t') != -1) str = str.substring(0, str.indexOf('\t')) + " " + str.substring(str.indexOf('\t') + 1);