-
-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Description
I have an issue with ColoredConsoleAppender on WIndows 10.
After initialization it prints an extra "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.
After debugging I found that it happens in ActivateOptions function when setting AutoFlush
property of StreamWriter to true.
m_consoleOutputWriter.AutoFlush = true; |
If you look at sources of Console.WriteLine method, they set HaveWrittenPreamble
property to true
to bypass writing it by streamwriter. That's why they have no such issue.
https://referencesource.microsoft.com/#mscorlib/system/console.cs,373