Let me state the obvious, for any application you develop you need to log information, errors, exceptions etc that can help you and others know what’s going on with your application
When you create a new Windows Azure application using Visual Studio you will find the following snippet in your configuration file
/span>addtype="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
You have diagnostic’s right out of the box , and you can write code as below
Trace.TraceInformation(“Information to log”);
Diagnosticsare then logged to Azure blob storage.
However, you might require to not use the default Azure diagnostics
For example , you might choose to use a service like Loggly
to log and analyse your logs.
You also get added features like alerts which is why I decided to use them
To setup logging with loggy is easy
Sign up for a loggly account from their website
You can then implement the TraceListener abstract class
public class LogglyTraceListener:TraceListener
public override void Write(string message)
public override void WriteLine(string message)
ILogger logger = new Loggly.Logger("APIKeyHere");
In you configuration file , change diagnostics to use your new trace listener
Now when you write Trace logs they should show up in loggly ready for you to analyse