我正在尝试将天蓝色诊断数据存储在存储帐户上。我尝试了以下代码:
public override bool OnStart()
{
// For information on handling configuration changes
// see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
// Get the default initial configuration for DiagnosticMonitor.
DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration();
// Filter the logs so that only error-level logs are transferred to persistent storage.
diagnosticConfiguration.Logs.ScheduledTransferLogLevelFilter = LogLevel.Information;
// Schedule a transfer period of 30 minutes.
diagnosticConfiguration.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1.0);
// Specify a buffer quota of 1GB.
diagnosticConfiguration.Logs.BufferQuotaInMB = 900;
// Start the DiagnosticMonitor using the diagnosticConfig and our connection string.
DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagnosticConfiguration);
Trace.TraceInformation("WebRole started");
return base.OnStart();
}
我试图注释掉 BufferQuotaInMB 没有运气。我已经在本地环境和实时部署中使用新创建的应用程序进行了尝试。事实证明,甚至没有创建 WADLogsTable。
我错过了什么?
注意:它在使用 windowsEventLogs 进行实时部署时工作正常。