-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ColoredConsoleAppender writes UTF-8 preamble to the console on initialization #168
Comments
FreeAndNil
added a commit
that referenced
this issue
Aug 15, 2024
Hi @RoboBurned , can you check whether log4net.3.0.0-preview.2b.zip fixes your problem? |
FreeAndNil
added a commit
that referenced
this issue
Aug 16, 2024
FreeAndNil
added a commit
that referenced
this issue
Aug 16, 2024
@FreeAndNil Yes, the version you provided fixes the issue for me. Thank you. |
Closed
@RoboBurned Thanks for testing, will be fixed in 3.0.0-Preview.3. |
FreeAndNil
added a commit
that referenced
this issue
Aug 18, 2024
#168 wrap encoding in ColoredConsoleAppender for skipping preamble
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.logging-log4net/src/log4net/Appender/ColoredConsoleAppender.cs
Line 467 in ad0180f
If you look at sources of Console.WriteLine method, they set
HaveWrittenPreamble
property totrue
to bypass writing it by streamwriter. That's why they have no such issue.https://referencesource.microsoft.com/#mscorlib/system/console.cs,373
The text was updated successfully, but these errors were encountered: