You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Fred am Nil <fr...@apache.org> on 2024/08/07 21:12:12 UTC
Re: [BUG] ColoredConsoleAppender prints UTF-8 writes preamble to console
Hi Robo Burned,
this mailing list is rarely used nowadays (you wrote the first message this year).
Can you please create an issue at
https://github.com/apache/logging-log4net/issues/new
Regards
Jan
On 2024/07/29 15:57:26 Robo Burned wrote:
> Hi,
> Sorry if this is the wrong place to report issues.
>
> I have an issue with ColoredConsoleAppender on WIndows 10.
> After initialization it prints a "space" to the console at the very
> beginning.
> It writes the preamble of UTF-8 encoding that results in a visual "space"
> in windows console.
>
> It happens in ActivateOptions when setting AutoFlush property of
> StreamWriter to true.
> https://github.com/apache/logging-log4net/blob/ad0180f9bfb712cd52bda28b74ec7d64ea7f3bb8/src/log4net/Appender/ColoredConsoleAppender.cs#L467
>
> If you look at Console.WriteLine sources, they set HaveWrittenPreamble
> property to true to bypass writing it by streamwriter.
> https://referencesource.microsoft.com/#mscorlib/system/console.cs,373
>
> Best regards,
> Robo Burned
>