when I use
Diagnostics.Trace.WriteLine("message", "Information");
in my azure-asp.net this does not show up in my azure compute emulator, but if I do the same from my worker-role it works, any idea why?
Thanks!
WriteLine(String) Writes a message to the trace listeners in the Listeners collection. WriteLine(Object, String) Writes a category name and the value of the object's ToString() method to the trace listeners in the Listeners collection.
The Trace class provides properties to get or set the level of Indent and the IndentSize, and whether to AutoFlush after each write.
Tracing helps to see the information of issues at the runtime of the application. By default Tracing is disabled. Tracing has the following important features: We can see the execution path of the page and application using the debug statement. We can access and manipulate trace messages programmatically.
Go to Application Insights resource in your resource group. Go to Logs under Monitoring section. Click on traces eye button to get log traces. Select Time Range and click Run.
This is with SDK 1.3, right? In 1.3, web roles by default run with full IIS, which means your actual web app code is in a different app domain from your RoleEntryPoint. I believe the compute emulator only shows messages from RoleEntryPoint (WebRole.cs or WorkerRole.cs).
To double check, try putting a trace message in OnStart in WebRole.cs; I'm guessing it will show up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With