hi! - slightly related:
is it possible to identify each of the object instances
involved in the method invocation chain? that is, if
I've had a log code like this:
public class Abc {
static void x() {
log();
}
static class B {
void y() {
x();
}
}
static class A {
void z() {
new B().y();
}
}
static public void main(String[] args) {
new A().z();
}
static void log() {
// do the actual logging - ...but for now:
new Throwable().printStackTrace();
}
}
I may obtain something like this with the standard code:
java -classpath . Abc
java.lang.Throwable
at Abc.log(Abc.java:20)
at Abc.x(Abc.java:3)
at Abc$B.y(Abc.java:7)
at Abc$A.z(Abc.java:12)
at Abc.main(Abc.java:16)
what I would like to do _now_ is to obtain a (log)
output which may look like this:
java.lang.Throwable
at Abc.log(Abc.java:20)
at Abc.x(Abc.java:3)
at Abc$B.y(Abc.java:7) -- Abc$B@4b222f
at Abc$A.z(Abc.java:12) -- Abc$A@2f6684
at Abc.main(Abc.java:16)
(sorry - that this sounds an awful lot like a FAQ...)
regards,
kenji
> From: "Timothy Mulle'" <[EMAIL PROTECTED]>
> Date: Mon, 20 Aug 2001 08:09:50 -0400
>
> Freidii,
>
> use the %M character in your patternlayout...take a look at the
> PatternLayout javadocs for the complete list.
>
> - Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]