Search code examples
asp.netwindowsazureazure-configuration

Windows Azure Web Role Log files


Is there a simple way to trace or write some log in a ASP.Net MVC3 Azure Web Role ?
I just want to write some informations and look in a log file if they were printed.
Like : WriteLine("Start Function A");


Solution

  • You need a way to get to these trace statements outside of Windows Azure, and the way Windows Azure handles this is through its diagnostics monitor. All tracing then gets routed to a table (WADLogsTable), and you can then query this table either from the role instance itself or from an app running outside of Windows Azure (by doing Linq queries, maybe Cerebrata's Diagnostic Manager, etc.). This table will aggregate log output from all your role instances.

    One of my teammates, Greg Oliver, recently blogged about the basics.