I have a worker role that I would like to get diagnoistics feedback on... after adding the appropriate connection string to the ServiceConfiguration.cscfg and th开发者_如何转开发e following code:
//DiagnosticMonitor.Start("DiagnosticsConnectionString");
DiagnosticMonitorConfiguration diagConfig = DiagnosticMonitor.GetDefaultInitialConfiguration();
diagConfig.WindowsEventLog.DataSources.Add("Application!*");
diagConfig.WindowsEventLog.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(5.0);
diagConfig.Logs.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(5.0);
Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.Start("DiagnosticsConnectionString", diagConfig);
CrashDumps.EnableCollection(true);
When I call "System.Diagnostics.Trace.TraceInformation("test log") I expect to be able to find the record in the WADLogsTable of the target Azure Storage Account. Howver, the table doesn't exist- how is it created? None of the documentation I've read covers this.
Thanks in advance,You'll want to set a log level filter, like:
diagConfig.Logs.ScheduledTransferLogLevelFilter = LogLevel.Information;
I have a more detailed answer here.
Note that occasionally, in the simulation environment, the tables don't get created immediately.
精彩评论