X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Futil%2FLog.java;h=bb690b21cf1d44960f57cfab0f617a98433ac1cc;hb=a88b93becb603643cb2fa323499f27e80a22700b;hp=37bfd5cb9532d6d8ee996d94a920128439bc22bf;hpb=77f562e1b6ef60e9ca0e9028dd4d4b9c8053dc69;p=org.ibex.core.git diff --git a/src/org/xwt/util/Log.java b/src/org/xwt/util/Log.java index 37bfd5c..bb690b2 100644 --- a/src/org/xwt/util/Log.java +++ b/src/org/xwt/util/Log.java @@ -62,13 +62,13 @@ public class Log { if (firstMessage && !logDates) { firstMessage = false; System.err.println(color(GREEN, false, "===========================================================================")); - String incolor = color ? "in " + + diag(Log.class, "Logging enabled at " + new java.util.Date()); + if (color) diag(Log.class, "logging messages in " + color(BLUE, true, "c") + color(RED, true, "o") + color(CYAN, true, "l") + color(GREEN, true, "o") + - color(PURPLE, true, "r") + " " : ""; - diag(Log.class, "Logging enabled at " + new java.util.Date() + " " + incolor); + color(PURPLE, true, "r")); } String classname; @@ -84,6 +84,7 @@ public class Log { while (classname.length() < (logDates ? 14 : 20)) classname = " " + classname; classname = classname + (classname.trim().length() == 0 ? " " : ": "); classname = color(GRAY, true, classname); + classname = classname.replace('$', '.'); if (logDates) { Date d = new Date(); @@ -108,7 +109,7 @@ public class Log { try { String m = ""; while((s = br.readLine()) != null) m += s + "\n"; - log(o, m, level); + log(o, m.substring(0, m.length() - 1), level); } catch (IOException e) { System.err.println(color(RED, true, "Logger: exception thrown by ByteArrayInputStream -- this should not happen")); }