Azure 診断データをストレージ アカウントに保存しようとしています。次のコードを試しました:
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();
}
このコードは、Microsoft が MSDN http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.windowsazure.diagnostics.diagnosticmonitorconfiguration.logsで提案したものと同じです。
BufferQuotaInMB をコメントアウトしようとしましたが、うまくいきませんでした。ローカル環境とライブ展開の両方で、新しく作成したアプリケーションでこれを試しました。WADLogsTable さえ作成されていないことが判明しました。
私が見逃しているのは何ですか?
注: windowsEventLogs を使用したライブ展開では問題なく動作しています。