Azure diagnostics and WadLogsTable

拥有回忆 提交于 2019-12-20 05:59:31

问题


I deployed an application on Windows Azure, i activated the diagnostic monitor like follows :

public override bool OnStart()
    {

        CloudStorageAccount account = CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=[xxxxxx];AccountKey=[xxxxxxx]");

       var config = DiagnosticMonitor.GetDefaultInitialConfiguration();

        config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Information;
        config.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1D);    

        DiagnosticMonitor.Start(account, config);

        return base.OnStart();
    }

My question is why the logs are not stored automatically in "WADLogsTable" until i use "Azure diagnostic Manager 2" for Cerebrata and i use the "On demand transfer"?


回答1:


I think your problem is that you haven't used SetCurrentConfiguration() with your GetDefaultInitialConfiguration() to finally save the transfer time and log level. You must use the set of these API as below:

GetDefaultInitialConfiguration() 
SetCurrentConfiguration() 

OR

GetCurrentConfiguration()
SetCurrentConfiguration()

It is also good to know the the differences between these two.



来源:https://stackoverflow.com/questions/10870665/azure-diagnostics-and-wadlogstable

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