-
Notifications
You must be signed in to change notification settings - Fork 172
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
Conversation
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.
Thanks for tackling this.
src/Logging/SimpleConsoleLogger.cs
Outdated
@@ -10,6 +10,39 @@ | |||
|
|||
namespace Microsoft.CodeAnalysis.Tools.Logging | |||
{ | |||
internal class SimpleTerminal : ITerminal |
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.
Move this class to a separate file
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.
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
.
remove SimpleTerminal because it is no longer used.
fixes are done. |
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.
Looks good to me. Thanks!
This PR is related on #21.
creating simple terminal instance for logging if GetTerminal returns null.