I have a third-party .NET library that enables output of some key diagnostic information to a TextWriter
instance. I'd like to have this information dumped to the output window of Visual Studio 2008 while in debug mode and ignored if not in debug mode. Is there any way I can get a reference to an output stream that uses this output window so I can create a TextWriter
that uses it?
To use the console for output, I can do...
foo.LogTo(Console.Out);
Using this interface, can I get log info sent to the output window?