Hi Ceki,

> For reasons you can understand I am not particularly fond of 
> parsing lines. The existing code of VectorWriter would not 
> win a beauty contest, I'll admit that. 

It's not a question of "beauty". There are two logic issues here:

1) If VectorWriter doesn't form a complete PrintWriter, it is clearly
broken. There are other applications apart from Orion out there that
implement printStackTrace, and they may legally use _any_ method of
PrintWriter. We are in danger of standing by while the house burns down
if we ignore this fact. ;-) Hmmm. If you documented that log4j does not
support applications which override printStackTrace(), this may be OK.
But, are you willing to do this?

2) If VectorWriter simply adds anything passed to a print(*) method to
the Vector, it is clearly broken. For example, Orion passes multiple
lines delimited by /r/n into print(String). If you add that to the
vector as a single entry, it will break the (implied, since there is no
Javadoc) contract of ThrowableInformation.getThrowableStrRep() which
says that each String in the Array contains a single line of stack
trace. And, this will then cause formatting problems for any Appenders
which rely on this when they are trying to format the stack trace.

> Can you please let me 
> know if my recent commit solves the problem? 

Doesn't seem like theres much point testing the current solution given
the above.

Also, I'd like to point out that I don't need an immediate fix - I'd
prefer you take your time and do it properly. The "slow but steady"
solution I provided in my email is working fine for what I need. And, as
I am sure you are aware, JDK1.4 provides access to structured stace
trace information via java.lang.StackTraceElement. So, at some stage
you'll probably need to refactor the way that ThrowableInformation works
to be compatible with 1.4. Why not just save this problem up and and fix
it properly at the same time as you refactor for 1.4?

> Thanks. By the 
> way, I very much appreciate the quality of your bug report, 
> if all bug reports were like that.

No problem. Thanks for making the effort to create something useful. :-)

Cheers,

Geoff


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

Reply via email to