Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure: How to create the WADLogsTable for capturing diagnostics code?

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 the 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,

like image 506
mytwocents Avatar asked Dec 20 '10 21:12

mytwocents


1 Answers

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.

like image 160
David Makogon Avatar answered Oct 17 '22 14:10

David Makogon