2013-02-22 96 views

回答

-1

您可以使用特殊源Logging Errors & Warnings作爲備用配置。

您的配置通常會記錄到共享文件跟蹤偵聽器。此外,當您爲Logging Errors & Warnings配置specialSource時,它將首先嚐試登錄到共享文件跟蹤偵聽器,如果失敗,它將回退到此平面文件跟蹤偵聽器,如您在Logging Errors & Warnings部分中配置的那樣。

例如:

<specialSources> 
    <!-- other configurations related with unprocessed categories or all events can be placed here --> 
    .... 
    <!-- this will be in action when an error occurs during logging --> 
    <errors switchValue="All" name="Logging Errors & Warnings"> 
    <listeners> 
     <add name="Local File Trace Listener" /> 
    </listeners> 
    </errors> 

你可以看到herehere以獲取更多信息。

+0

一旦網絡路徑不可用,此解決方案將無法正常工作 Venkat 2018-01-09 07:40:56

相關問題