logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Dougherty <Mi...@san.rr.com>
Subject Re: Contributing
Date Tue, 05 Jun 2001 21:20:04 GMT
Ceki Gülcü wrote:
> Hi Mike,
> We all make mistakes there is no shame in that. I wouldn't worry about it.
> Thank you for your offer for help. Bug #1960 might be suitable. Have a look at
>   http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=1960
> Regards, Ceki

I know I keep saying this, and it's probably getting redundant,
redundant. I'm new here so I don't know if this is an appropriate

I have looked at the code for this bug and the quick fix is to do just
what he suggests. Check to see if the file is zero length before
inserting the header. However, I am a little nervous about solving it
this way because it leaves the superclass (WriterAppender) with the same
type of problem. Ideally (at least I think) the WriterAppender shouldn't
write a header if one exists. The trouble is I can't think of a case
when I WriterAppender (or subclass thereof) will have existing entries
outside the context of a File. Without making this case I will have a
difficult time justifying the time to implement the solution needed for
this object.

One sure way to solve either case is just to always insert the header at
the zeroth index with an offset of getHeader().length(). The problem
with this approach is that you run the risk of the header changing
length. Longer and you overwrite log entries, shorter and you leave
previous header garbage...

I am a little nervous to just go ahead and commit to one method or the
other because I am not that familiar the development styles of this
project and which solution they would prefer. Any help to point me in
one direction or the other would be appreciated.


 Mike Dougherty -- Java Software Engineer

To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

View raw message