-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix regression with log file summary. #2110
Conversation
A change was (dotnet#1513) to allow for more control over log summary text. Specifically, the ask was to allow for the use of ErrorsOnly / WarningsOnly with Summary. That change also impacted the file log output and in some cases caused build summary to output to the log file when using ErrorsOnly. This change defaults to not showing the summary text in the FileLogger when ErrorsOnly or WarningsOnly is set (it can still be displayed with the Summary flag). This reverts behavior back to pre-VS2017 behavior and allows for an empty err/wrn file to be produced. Closes dotnet#1968
@@ -342,6 +343,36 @@ public void BasicNoExistingDirectory() | |||
} | |||
} | |||
|
|||
[Theory] | |||
[InlineData("warningsonly")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if both are set? :)
1b3ea8e
to
5caff1c
Compare
|
@@ -269,7 +274,7 @@ private void ApplyFileLoggerParameter(string parameterName, string parameterValu | |||
/// <summary> | |||
/// Encoding for the output. Defaults to UTF-8. | |||
/// </summary> | |||
private Encoding _encoding = Encoding.UTF8; | |||
private Encoding _encoding = new UTF8Encoding(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to pass false because the default ctor of UTF8Encoding passes false already:
http://referencesource.microsoft.com/#mscorlib/system/text/utf8encoding.cs,65
A change was (#1513) to allow for more control over log summary text.
Specifically, the ask was to allow for the use of ErrorsOnly /
WarningsOnly with Summary. That change also impacted the file log output
and in some cases caused build summary to output to the log file when
using ErrorsOnly.
This change defaults to not showing the summary text in the FileLogger
when ErrorsOnly or WarningsOnly is set (it can still be displayed with
the Summary flag). This reverts behavior back to pre-VS2017 behavior and
allows for an empty err/wrn file to be produced.
Closes #1968