How to view the azure diagnostic log

I cannot find out how to see the Azure diagnostic logs. The code I wrote is as follows.

DiagnosticMonitorConfiguration config = iagnosticMonitor.GetDefaultInitialConfiguration(); System.Diagnostics.Trace.Listeners.Add(new Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener()); config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Information; config.WindowsEventLog.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(1.0); DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", config); 

then I added Trace.WriteLine("some message"); into the code. Now where can I find these posts. I checked in Visual Studio server explorer where I added a link to my account. wad-control-container has only configuration files.

+7
source share
3 answers

You might want to take a look at this blog post by Michael S. Collier. Setting up in a cloud project can cause the logs to be in a different place than you would expect from them:

http://michaelcollier.wordpress.com/2012/04/02/where-is-my-windows-azure-diagnostics-data/

Update:

Please note that you need to take care of every little detail for everything to work.

Where do you write Trace.WriteLine("some message"); ? Is this in your WebRole.cs? In this case, you need to set up a trace listener for WebRole.cs (this is done in a different process than your actual web application).

Here is an example of how you can configure the trace listener in the WebRole.cs class:

 System.Diagnostics.Trace.Listeners.Add(new Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener()); System.Diagnostics.Trace.AutoFlush = true; 

After setting this parameter, you can use Trace.WriteLine .

+9
source
+1
source

I wrote a tool that allows you to view Azure diagnostic information .. check it out

AzTools - Azure Diagnostic Viewer

Click here to find out how you can use this tool.

0
source

All Articles