logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Asher Kohn <ericasherk...@gmail.com>
Subject EncryptedFileAppender
Date Tue, 06 Jul 2010 11:33:58 GMT

There is post I pulled up from the mailing list archives dated: Mon, 02 May
2005 17:31:51 GMT (see link below) that says to create an EncryptedAppender
override the FileAppender. In fact the XML comments for the the method
protected virtual void SetQWForFiles(Stream fileStream) say "This method can
be overridden by sub classes that want to wrap the System.IO.Stream in some
way, for example to encrypt the output data using a

However, when sub classing FileAppender I noticed the function
SetQWForFiles(Stream fileStream) never gets called. When looking at the
class using .NET Reflector I see that the method protected virtual void
OpenFile(string fileName, bool append) calls the method protected virtual
void SetQWForFiles(TextWriter writer) which does not easily wrapping the
stream in a CryptoStream.

I see how one could override the OpenFile method and create the CryptoStream
but I figured it would be easier than that. Am I missing something?

Thanks for a wonderful software library and running this mailing list.



View raw message