|
|
@@ -6,16 +6,80 @@
|
|
|
Provides the default output methods and behavior for tracing.
|
|
|
</summary>
|
|
|
<remarks>
|
|
|
- Since there is no debugging API ala Win32 on Mono,
|
|
|
- <see cref="System.Console.Out">Console.Out</see>
|
|
|
- is being used as the default output method.
|
|
|
-
|
|
|
- <para>This needs help, as MSDN specifies that GUI widgets be used
|
|
|
- for certain features. The short-term solution is to just send
|
|
|
- output to OutputDebugString.</para>
|
|
|
+ <para>There are three ways to get output from the
|
|
|
+ <c>DefaultTraceListener</c>.</para>
|
|
|
+ <list type="number">
|
|
|
+ <item><description>Set the <see cref="LogFileName"/> property.
|
|
|
+ This will cause all output to be appended to the specified log
|
|
|
+ file.
|
|
|
+ <para>This is the only mechanism that is consistent across
|
|
|
+ both Windows and Unix platforms.</para>
|
|
|
+ </description></item>
|
|
|
+ <item><description>On Windows, messages are displayed using the
|
|
|
+ <c>OutputDebugString</c> API. (Look it up on MSDN.) Messages
|
|
|
+ are automatically displayed in the debugger if the program is
|
|
|
+ being debugged. If the program isn't being debugged, a
|
|
|
+ program such as <c>DebugView</c> (available from
|
|
|
+ www.systeminternals.com) can be used to view the output.
|
|
|
+ </description></item>
|
|
|
+ <item><description>On Unix, behavior is dependant upon the
|
|
|
+ <c>MONO_TRACE</c> environment variable.
|
|
|
+ <para>If <c>MONO_TRACE</c> isn't set or is empty, messages are
|
|
|
+ ignored.</para>
|
|
|
+ <para>If <c>MONO_TRACE</c> is set, messages will be sent where
|
|
|
+ <c>MONO_TRACE</c> specifies. <c>MONO_TRACE</c> accepts
|
|
|
+ three different sets of values:</para>
|
|
|
+ <list type="bullet">
|
|
|
+ <item>
|
|
|
+ <term><c>Console.Out</c></term>
|
|
|
+ <description>Send messages to standard output.</description>
|
|
|
+ </item>
|
|
|
+ <item>
|
|
|
+ <term><c>Console.Error</c></term>
|
|
|
+ <description>Send messages to standard error.</description>
|
|
|
+ </item>
|
|
|
+ <item>
|
|
|
+ <term>Anything else</term>
|
|
|
+ <description>Treat "Anything else" as a file, and append the
|
|
|
+ message to the specified file.</description>
|
|
|
+ </item>
|
|
|
+ </list>
|
|
|
+ <para>Both <c>Console.Out</c> and <c>Console.Error</c> allow the
|
|
|
+ specification of a "prefix" -- a message that will prefix all
|
|
|
+ messages sent to the specified location. The prefix is
|
|
|
+ appended to the location, separated from the location with a
|
|
|
+ colon (':').
|
|
|
+ </para>
|
|
|
+ <para>For example,
|
|
|
+ <c>export MONO_TRACE="Console.Out:** my prefix "</c>
|
|
|
+ would send messages to standard output. Messages would be
|
|
|
+ prefixed with the string "<c>** my prefix </c>".
|
|
|
+ </para>
|
|
|
+ <para>Other valid examples are:
|
|
|
+ <list type="bullet">
|
|
|
+ <item><description><c>export MONO_TRACE="/dev/stdout"</c>,
|
|
|
+ which would also send messages to the console.
|
|
|
+ </description></item>
|
|
|
+ <item><description><c>export MONO_TRACE="out.txt"</c>, which
|
|
|
+ would append messages to the file "out.txt" in the current
|
|
|
+ working directory.
|
|
|
+ </description></item>
|
|
|
+ <item><description><c>export MONO_TRACE="/dev/ttyS0"</c>, which
|
|
|
+ would append messages to the serial port, if permitted.
|
|
|
+ </description></item>
|
|
|
+ </list>
|
|
|
+ </para>
|
|
|
+ </description></item>
|
|
|
+ </list>
|
|
|
+ <para>The <c>DefaultTraceListener</c> is not complete.
|
|
|
+ MSDN specifies that GUI widgets be used
|
|
|
+ for certain features. The short-term solution is to forgo GUI
|
|
|
+ widgets and use the normal existing mechanisms (log file, console,
|
|
|
+ <c>OutputDebugString</c>).</para>
|
|
|
</remarks>
|
|
|
<constructor name="DefaultTraceListener">
|
|
|
- <summary>TODO</summary>
|
|
|
+ <summary>Create a new instance of the <c>DefaultTraceListener</c>,
|
|
|
+ with "Default" as its <see cref="Name"/>.</summary>
|
|
|
<remarks>TODO</remarks>
|
|
|
</constructor>
|
|
|
<property name="AssertUiEnabled">
|