Skip to content
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

Merged
merged 3 commits into from
May 18, 2017

Conversation

AndyGerlicher
Copy link
Contributor

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

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")]
Copy link
Contributor

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? :)

@cdmihai
Copy link
Contributor

cdmihai commented May 18, 2017

:shipit:

@AndyGerlicher AndyGerlicher merged commit f61874b into dotnet:master May 18, 2017
@@ -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);
Copy link
Member

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

@AndyGerlicher AndyGerlicher deleted the emptyerrorlogfix2 branch June 26, 2018 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants