2016-03-01 79 views
0

我有一個eventloglistener設置是這樣的:eventloglistener不會寫入事件日誌服務器上

<trace autoflush="true" indentsize="2"> 
<listeners> 
<!--<remove name="Default" />--> 
<add name="EventLogListener" type="System.Diagnostics.EventLogTraceListener" initializeData="myproj" /> 
</listeners> 
</trace> 
<switches> 
<!-- 
    "0" Off    
    "1" Error messages    
    "2" Warning, gives Error and Warning messages    
    "3" Information, gives Error, Warning and Information messages    
    "4" Verbose, gives Error, Warning, Information and Verbose messages 
    --> 
<add name="myproj" value="4" /> 
</switches> 

運行的本地時,但releaseing到我的服務器沒事的時候寫它工作正常。這是爲什麼?我需要授予一些權限嗎?

回答