You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by Stefan Bodewig <bo...@apache.org> on 2016/09/07 20:19:47 UTC

Re: Fix for FileAppender's TextWriter creation in OpenFile

On 2016-08-22, <Jo...@rohde-schwarz.com> wrote:

> `FileAppender` has a vritual overload for the Method `SetQWForFiles` that
> takes a `Stream` and creates a StreamWriter from it. According to the API
> documentation
> """
> This method can be overridden by sub classes that want to wrap the
> <see cref="Stream"/> in some way, for example to encrypt the output
> data using a <c>System.Security.Cryptography.CryptoStream</c>.
> """

> Unfortunately, it doesn't get called. Instead it is inlined in `OpenFile`,
> so derived classes have no chance in wrapping the stream before it is
> passed to the writer.
> This trivial patch changes this.

Patch applied, many thanks

      Stefan