Azure的诊断和WadLogsTable [英] Azure diagnostics and WadLogsTable

查看:204
本文介绍了Azure的诊断和WadLogsTable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我部署在Windows Azure上的应用程序,我激活了诊断监视器类似如下:

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();
    }

我的问题是,为什么日志不会被自动保存在WADLogsTable,直到我用Azure的诊断经理2Cerebrata我用的是按需转移?

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"?

推荐答案

我觉得你的问题是,你还没有使用SetCurrentConfiguration()与GetDefaultInitialConfiguration()来最终节省传输时间和日志级别。您必须使用下面的一组API,这些的:

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() 

GetCurrentConfiguration()
SetCurrentConfiguration()

这也是不错知道这两者之间的区别。

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

这篇关于Azure的诊断和WadLogsTable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆