Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

<remove> Element

Removes a listener from the Listeners collection.

<configuration>
   <system.diagnostics>
      <trace>
         <listeners>
            <remove>

<remove name="listener name" />

Required Attributes

Attribute Description
name The name of the listener to remove from the Listeners collection.

Example

The following example shows how to remove the default trace listener from the trace Listeners collection.

<configuration>
   <system.diagnostics>
      <trace autoflush="true" indentsize="0">
         <listeners>
            <remove name="Default" />
         </listeners>
      </trace>
   </system.diagnostics>
</configuration>

Configuration File

This element can be used in the machine configuration file (Machine.config) and the application configuration file.

See Also

Trace and Debug Settings Schema | TraceListener Class | DefaultTraceListener Class | TextWriterTraceListener Class | EventLogTraceListener Class

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft