Welcome to mirror list, hosted at ThFree Co, Russian Federation.

DefaultTraceListener.xml « System.Diagnostics « en « xml « apidocs « docs « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 973d73bb84594cb0c1b2f3a08cbca09454967250 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE monodoc SYSTEM "http://www.go-mono.org/monodoc.dtd">
<monodoc language="en">
    <class name="System.Diagnostics.DefaultTraceListener" assembly="System">
        <summary>
          Provides the default output methods and behavior for tracing.
        </summary>
        <remarks>
          <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>Create a new instance of the <c>DefaultTraceListener</c>,
            with "Default" as its <see cref="Name"/>.</summary>
            <remarks>TODO</remarks>
        </constructor>
        <property name="AssertUiEnabled">
            <summary>TODO</summary>
            <remarks>TODO</remarks>
            <value>TODO</value>
        </property>
        <property name="LogFileName">
            <summary>
              Gets or sets name of a log file to write trace or debug 
              messages to.
            </summary>
            <remarks>TODO</remarks>
            <value>
              The name of a log file to write trace or debug messages to.
            </value>
        </property>
        <method name="WriteLine(System.String)">
            <summary>
              Writes the output to the Console, followed by a newline
            </summary>
            <remarks>TODO</remarks>
            <param name="message">The message to write.</param>
            <returns>TODO</returns>
        </method>
        <method name="Write(System.String)">
            <summary>Writes the output to the Console.</summary>
            <remarks>TODO</remarks>
            <param name="message">The message to write.</param>
            <returns>TODO</returns>
        </method>
        <method name="Fail(System.String, System.String)">
            <summary>
              Emits or displays detailed messages and a stack trace
              for an assertion that always fails.
            </summary>
            <remarks>TODO</remarks>
            <param name="message">The message to emit or display.</param>
            <param name="detailMessage">
              The detailed message to emit or display.
            </param>
            <returns>TODO</returns>
        </method>
        <method name="Fail(System.String)">
            <summary>
              Emits or displays a message and a stack trace for an 
              assertion that always fails.
            </summary>
            <remarks>TODO</remarks>
            <param name="message">The message to emit or display.</param>
            <returns>TODO</returns>
        </method>
    </class>
</monodoc>