Permalink
Browse files

send trace output to stdout

  • Loading branch information...
1 parent 8f0f181 commit 9e7fc93c5816aeea4ea8a41b48f3f1b6e4e50114 @bamboo bamboo committed Sep 8, 2011
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/Boo.Lang.Compiler/CompilerContext.cs
@@ -28,6 +28,7 @@
using System;
using System.Diagnostics;
+using System.IO;
using Boo.Lang.Compiler.Ast;
using Boo.Lang.Compiler.Services;
using Boo.Lang.Compiler.TypeSystem.Reflection;
@@ -319,18 +320,23 @@ private void DedentTraceOutput()
private void TraceLine(object o)
{
WriteIndentation();
- Console.Error.WriteLine(o);
+ TraceWriter.WriteLine(o);
}
private void WriteIndentation()
{
- for (var i=0; i<_indentation; ++i) Console.Error.Write('\t');
+ for (var i=0; i<_indentation; ++i) TraceWriter.Write('\t');
+ }
+
+ private TextWriter TraceWriter
+ {
+ get { return Console.Out; }
}
private void TraceLine(string format, params object[] args)
{
WriteIndentation();
- Console.Error.WriteLine(format, args);
+ TraceWriter.WriteLine(format, args);
}
private readonly CachingEnvironment _environment;

0 comments on commit 9e7fc93

Please sign in to comment.