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

avoiding exception when redirect stdout(#21) #23

Merged
merged 3 commits into from
Feb 28, 2019

Conversation

itn3000
Copy link
Contributor

@itn3000 itn3000 commented Feb 27, 2019

This PR is related on #21.
creating simple terminal instance for logging if GetTerminal returns null.

@dnfclas
Copy link

dnfclas commented Feb 27, 2019

CLA assistant check
All CLA requirements met.

Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this.

@@ -10,6 +10,39 @@

namespace Microsoft.CodeAnalysis.Tools.Logging
{
internal class SimpleTerminal : ITerminal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this class to a separate file

Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this a bit more. I think the better solution might be to keep a reference to console in the SimpleConsoleLogger and based on whether _terminal is null call a LogToTerminal or LogToConsole method from Log.

@itn3000
Copy link
Contributor Author

itn3000 commented Feb 28, 2019

fixes are done.

Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

@JoeRobich JoeRobich merged commit cb4e9f4 into dotnet:master Feb 28, 2019
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.

3 participants