Azure diagnostics - Event Source is always disabled -
i trying log etw events enabling azure diagnostics in cloud service. after deployment, if check in diagnostics configuration dialog, etw logs seems enabled. also, wad* tables created custom etw tables specified in diagnostics.wadcgfx file not created @ all. here logging code -
public sealed class vstseventsourcewriter : eventsource { public void logexception(int eventid, string errormessage, string exceptiontype, string exceptionmessage, string stacktrace) { if (isenabled()) { writeevent(eventid, errormessage, exceptiontype, exceptionmessage, stacktrace); } } }
code in diagnostics.wadcfgx -
<etwproviders> <etweventsourceproviderconfiguration provider="vstseventsourcewriter" scheduledtransferperiod="pt5m"> <event id="1" eventdestination="table1" /> <event id="2" eventdestination="table2" /> <event id="3" eventdestination="table3" /> <defaultevents eventdestination="defaulttable" /> </etweventsourceproviderconfiguration> </etwproviders>
if debug in service, isenabled()
false. writeevent
never gets called. using azure 2.9 sdk .net framework 4.5. should check logging work? have enabled diagnostics worker role properties in vs , specified storage account details store diagnostics results.
Comments
Post a Comment