问题
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!
回答1:
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.
来源:https://stackoverflow.com/questions/15501473/do-i-have-to-redeploy-an-azure-web-role-to-turn-on-iis-logging