Where are my Worker Role Trace logs?

When I debug locally I have a nice console output that shows my trace logs.  When I deploy my service where can I find my trace logs?  I'm working from scratch and learning as I go.  

My setup is a Cloud Service Worker Role.  I did try to add a storage account by following the walkthrough here.  However, simply put, this walkthrough doesn't work for me and I don't think it addresses my question for trace logging either.

Any help is greatly appreciated for this issue.

August 25th, 2015 10:30am

Hi,

 Have you gone through the below article on how to Enable Diagnostics in Cloud Service projects.
 https://msdn.microsoft.com/en-us/library/azure/dn186185.aspx
 
 You may also want to look into the below article on how to capture custom logs from azure worker roles (3rd Party site)
 http://www.modhul.com/2014/10/capturing-custom-logs-from-azure-worker-roles-using-azure-diagnostics/

Regards,
Nithin Rathnakar

Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 11:18am

Hi,

To take a look at (Windows Azure Diagnostics) which will allow you to collect diagnostics data (trace logs, event logs, perf. counters etc.) for your worker role. Depending on the configuration, this diagnostics data can be persisted into Windows Azure Table storage. You can view the diagnostics data using any storage explorer.

Refer :https://msdn.microsoft.com/en-us/magazine/ff714589.aspx

https://msdn.microsoft.com/en-us/library/azure/dn482131.aspx

Thanks

Abhishek

August 25th, 2015 11:24am

I'm sorry but all 3 links you offered are old and use deprecated technology which is no longer supported.  I still need a straight forward solution to this.
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 11:51am

I cannot access the 2nd link from my work computer - it is blocked here.  The first link has the same problem I keep running into, when following the links in it for "How To" do things it cycles back to the deprecated Diagnostics class.

Does Microsoft have no alternative way in place for logging with a tutorial on using it?  I don't understand why they remove things but not the documentation and provide new documentation to support the new methodologies.

I'm confused about logging this is all new to me and the lack of proper and useful documentation is frustrating.

August 26th, 2015 12:33pm

have a look at the steps outline in this link
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 10:00pm

Thank you for the link.  I see this has just been updated in the last couple of days, that is good.  I am working through it now, but Step 5 has me stumped.  How do I run the whole text as a script against my powershell?  I tried editing the text and pasting it into my powershell but i only get a bunch of errors.  

Step 5: Install Diagnostics on your Worker Role

The PowerShell cmdlets for managing Diagnostics on a web or worker role are: Set-AzureServiceDiagnosticsExtension, Get-AzureServiceDiagnosticsExtension, and Remove-AzureServiceDiagnosticsExtension.

  1. Open Azure PowerShell.
  2. Execute the script to install Diagnostics on your worker role (replace StorageAccountKey with the storage account key for your wadexample storage account):

    Copy<svg><use xlink:href="#clipboard" xmlns:xlink="http://www.w3.org/1999/xlink"></use></svg>
    $storage_name = "wadexample"
    $key = "<StorageAccountKey>"
    $config_path="c:\users\<user>\documents\visual studio 2013\Projects\WadExample\WorkerRole1\WadExample.xml"
    $service_name="wadexample"
    $storageContext = New-AzureStorageContext -StorageAccountName $storage_name -StorageAccountKey $key 
    Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath $config_path -ServiceName $service_name -Slot Staging -Role WorkerRole1

August 27th, 2015 4:24pm

Hi,

 Can you post the error your are receiving in powershell, Preferably with a screenshot attached.
 I think you need to launch Powershell ISE (Integrated Scripting Environment) so that you can run multiple lines of code. right click Powershell icon in the taskbar, and the menu that pops up, select Powershell ISE  (PS: ignore if you are already running in ISE)

Regards,
Nithin Rathnakar

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 6:39pm

Hi,

 Can you post the error your are receiving in powershell, Preferably with a screenshot attached.
 I think you need to launch Powershell ISE (Integrated Scripting Environment) so that you can run multiple lines of code. right click Powershell icon in the taskbar, and the menu that pops up, select Powershell ISE  (PS: ignore if you are already running in ISE)

Regards,
Nithin Rathnakar

August 27th, 2015 6:39pm

Great help, that is what I was missing with the power shell.  I will try to finish the walkthrough now.

As an aside, the Azure SDK 2.7 WorkerRole template project comes wired up with a trace listener that uses DiagnosticMonitorTraceListener which according to documentation has been deprecated since version 2.5.

In the meantime I used this tutorial to create a custom table and log entry, for anyone who comes to this thread in the future it may be useful.

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 9:01pm

Great help, that is what I was missing with the power shell.  I will try to finish the walkthrough now.

As an aside, the Azure SDK 2.7 WorkerRole template project comes wired up with a trace listener that uses DiagnosticMonitorTraceListener which according to documentation has been deprecated since version 2.5.

In the meantime I used this tutorial to create a custom table and log entry, for anyone who comes to this thread in the future it may be useful.

August 27th, 2015 9:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics