A day with .Net

My day to day experince in .net

Trace Logs

Posted by vivekcek on April 11, 2012

Trace Logs can be configured by the below code.These logs are transferred to azure table named “WADLogsTable”

 public override bool OnStart()
            var config = DiagnosticMonitor.GetDefaultInitialConfiguration();
            DiagnosticMonitorTraceListener tmp = new DiagnosticMonitorTraceListener();
            config.Logs.BufferQuotaInMB = 200;
            config.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1.0);
            DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", config);
            return base.OnStart();


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s