Ceki Gülcü wrote:
> 
> One quick question. Are you sure your code extracts the correct
> location information? Regards, Ceki
> 

Before we started using log4j we had our own home grown logging
mechanism which extracted the location information on the background
thread and we never had a problem with it and we used it on
JDK 1.2 and JDK 1.3.

The documentation for Throwable says
  "A Throwable class contains a snapshot of the execution stack
   of its thread at the time it was created. It can also contain
   a message string that gives more information about the error."
so it looks as though it is safe to parse the stack trace on a
different thread to the thread which originally threw it.

A question for you, in JDK 1.4 a getStackTrace method has
been added to Throwable which allows you to get access to the
location information much more easily, are there plans (has it
already been done) to use this mechanism when it is available
(not sure how you would tell) instead of parsing the printed
stack trace ?

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to