[导入]<remove> 元素从 Listeners 集合中移除侦听器
从 Listeners 集合中移除侦听器。
<configuration>
<system.diagnostics>
<trace>
<listeners>
<remove>
<remove name="listener name"/>
必选属性
| 属性 | 说明 |
|---|---|
| name | 要从 Listeners 集合中移除的侦听器的名称。 |
示例
以下示例说明如何从跟踪 Listeners 集合中移除默认的跟踪侦听器。
<configuration>
<system.diagnostics>
<trace autoflush="true" indentsize="0">
<listeners>
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
</configuration>
配置文件
此元素可用于计算机配置文件 (Machine.config) 和应用程序配置文件。
文章来源:http://www.codeguru.cn/ShowThread.aspx?PostID=738
浙公网安备 33010602011771号