Do I have to redeploy an Azure Web Role to turn on IIS Logging?

走远了吗. 提交于 2019-12-13 06:56:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!