Question

I have an Azure web role running an MVC Web API site. I'm using the diagnostics.wadcfg file to configure logging. So far I've just be using tracing and I view it with the Azure Diagnostics Monitor 2 from Cerebrata/Redgate. All is well.

I wanted to start logging out IIS requests. I know I can go to the wad-control-container to do some tweaks to logging by updating the content there as seen here:

<?xml version="1.0"?>
<ConfigRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <DataSources>
    <OverallQuotaInMB>4096</OverallQuotaInMB>
    <Logs>
      <BufferQuotaInMB>1024</BufferQuotaInMB>
      <ScheduledTransferPeriodInMinutes>1</ScheduledTransferPeriodInMinutes>
      <ScheduledTransferLogLevelFilter>Verbose</ScheduledTransferLogLevelFilter>
    </Logs>
    <DiagnosticInfrastructureLogs>
      <BufferQuotaInMB>0</BufferQuotaInMB>
      <ScheduledTransferPeriodInMinutes>0</ScheduledTransferPeriodInMinutes>
      <ScheduledTransferLogLevelFilter>Undefined</ScheduledTransferLogLevelFilter>
    </DiagnosticInfrastructureLogs>
    <PerformanceCounters>
      <BufferQuotaInMB>0</BufferQuotaInMB>
      <ScheduledTransferPeriodInMinutes>0</ScheduledTransferPeriodInMinutes>
      <Subscriptions />
    </PerformanceCounters>
    <WindowsEventLog>
      <BufferQuotaInMB>0</BufferQuotaInMB>
      <ScheduledTransferPeriodInMinutes>0</ScheduledTransferPeriodInMinutes>
      <Subscriptions />
      <ScheduledTransferLogLevelFilter>Undefined</ScheduledTransferLogLevelFilter>
    </WindowsEventLog>
    <Directories>
      <BufferQuotaInMB>0</BufferQuotaInMB>
      <ScheduledTransferPeriodInMinutes>0</ScheduledTransferPeriodInMinutes>
      <Subscriptions />
    </Directories>
  </DataSources>
  <IsDefault>true</IsDefault>
</ConfigRequest>

For example I can switch from Verbose to Information log tracing.

Can I turn on the IIS logging from here? Or do I have to update my diagnostics.wadcfg and redeploy?

Thanks for any help!

Était-ce utile?

La solution

You can use Cerebrata's Diagnostic Manager to change the configuration. It is done instance by instance. That change will be lost once you redeploy your application or your instance gets reimaged by Azure.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top