projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e639b1
)
added Log.setThreadAnnotation()
author
adam
<adam@megacz.com>
Sat, 8 May 2004 03:42:26 +0000
(
03:42
+0000)
committer
adam
<adam@megacz.com>
Sat, 8 May 2004 03:42:26 +0000
(
03:42
+0000)
darcs-hash:
20040508034226
-5007d-
9ff18a43b270a2a7ffd2743d8d3a1bdf97b303f5
.gz
src/org/ibex/util/Log.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/util/Log.java
b/src/org/ibex/util/Log.java
index
de7fe8d
..
beb7f3e
100644
(file)
--- a/
src/org/ibex/util/Log.java
+++ b/
src/org/ibex/util/Log.java
@@
-33,6
+33,9
@@
public class Log {
logstream = new PrintStream(new Socket(InetAddress.getByName(host), port).getOutputStream());
}
logstream = new PrintStream(new Socket(InetAddress.getByName(host), port).getOutputStream());
}
+ private static Hashtable threadAnnotations = new Hashtable();
+ public static void setThreadAnnotation(String s) { threadAnnotations.put(Thread.currentThread(), s); }
+
/** true iff nothing has yet been logged */
public static boolean firstMessage = true;
/** true iff nothing has yet been logged */
public static boolean firstMessage = true;
@@
-119,6
+122,8
@@
public class Log {
lastDate = d;
}
lastDate = d;
}
+ String annot = (String)threadAnnotations.get(Thread.currentThread());
+ if (annot != null) classname += annot;
if (message instanceof Throwable) {
if (level < ERROR) level = WARN;
if (message instanceof Throwable) {
if (level < ERROR) level = WARN;