logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Sandee <tbsan...@pobox.com>
Subject Patch to allow user to specify encoding for all subclasses of WriterAppender
Date Mon, 03 Sep 2001 04:21:45 GMT
Hello everyone!

I've attached two small [unified] diffs which adds a new configuration 
directive "encoding" to any subclasses of WriterAppender.  In our project, we 
need to be able to write out log data in UTF-8 format because of the I18N 
aspects of the data we are logging.  Of course the system encoding is not 
UTF-8 on our system, thus we needed a way to specify this for the 
FileAppender.  I have only modified FileAppender and WriterAppender, other 
classes such as DailyRollingFileAppender, etc. might might need to be 
modified slightly to take advantage of this configuration setting -- I'm not 
even sure if any other classes subclass WriterAppender.

I based the work off of the 1.1.3 source and ran the command diff -ub 
<ORIG_FILE> <NEW_FILE> to generate the diffs.

Please feel free to send any feedback to the list or to request a different 
diff format.

If you see this as a worthy addition to the core classes, you can modify it 
in any way you see fit to integrate it cleaner into the log4j framework.  
What I have provided is most likely a bit hackish because of the haste 
involved.

Thanks!

Ben

P.S. I am not a subscriber to the devel list and don't really plan on doing 
much development work, so I hope I haven't disrupted the user list too much 
by sending the diffs here.

Mime
View raw message