[Mono-list] Trace output to console
15 Jan 2003 15:15:51 -0500
Already done; just:
MONO_TRACE is somewhat more flexible. You can specify a "prefix" which
is prefixed to all Trace/Debug messages. For example, given the code:
Trace.WriteLine ("Hello, World!");
If MONO_TRACE is "Console.Out:++ " then the output produced would be:
++ Hello, World!
The prefix is everything after the `:'.
Alternatively, you can specify standard error (Console.Error, with the
same semantics for a prefix) or a log file (set MONO_TRACE to the file
Alternatively, if you have a .exe.config file, you can add:
However, this doesn't work nearly as well as I'd like due to a bug in
Finally, yes, this should be documented, but I'm waiting for gtk-monodoc
to be more usable/understandable (by me) so I can add the documentation.
On Wed, 2003-01-15 at 14:49, J. Perkins wrote:
> Just wondering: the MS/.NET default TraceListener sends it's output to
> the IDE "Output" window in debug builds. I have found this behavior to
> be handy. Mono could do something similar by writing to the console.
> Would there be any drawbacks/objections to this? I'd prefer not to add
> Mono specific code to my projects (installing a debug TraceListener),
> even if it is just for debug builds; I would rather see it in Mono
> proper. But maybe there is a good reason to not do that.
> Mono-list maillist - Monofirstname.lastname@example.org