Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you want to see your standard output and error of your worker process in an actual deployment then you will need to do some additional configuration. This data must be stored in a persistent storage.</p> <p>First step is to enable Diagnostics in the configuration window of your <code>WorkerRole</code>. Here a storage account must be specified.</p> <p>The next step is to add additional code to the <code>OnStart()</code> method of your <code>WorkerRole</code>. Here you can not only configure the standard output and error, but also you can listen to windows events and diagnostic information as provided in the following code example.</p> <pre><code>public override bool OnStart() { DiagnosticMonitorConfiguration diagConfig = DiagnosticMonitor.GetDefaultInitialConfiguration(); // Windows event logs diagConfig.WindowsEventLog.DataSources.Add("System!*"); diagConfig.WindowsEventLog.DataSources.Add("Application!*"); diagConfig.WindowsEventLog.ScheduledTransferLogLevelFilter = LogLevel.Error; diagConfig.WindowsEventLog.ScheduledTransferPeriod = TimeSpan.FromMinutes(5); // Azure application logs diagConfig.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose; diagConfig.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(5); // Performance counters diagConfig.PerformanceCounters.DataSources.Add( new PerformanceCounterConfiguration() { SampleRate = TimeSpan.FromSeconds(5), CounterSpecifier = @"\Processor(*)\% Processor Time" }); diagConfig.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(5); DiagnosticMonitor.Start( "Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagConfig); return base.OnStart(); } </code></pre> <p>After these settings your diagnostic data will be visible in the configured Azure Table storage. You can easily write tools to visualize your data here, but there are also some commercial tools that have built in functionality for this. For example <a href="http://cerebrata.com/Products/AzureDiagnosticsManager/Download.aspx" rel="nofollow">Cerebrata Diagnostics Manager</a>.</p> <p>If for some reason you don't want to use Azure Storage for storing log files you can implement a custom trace listener that may write logs anywhere else. <a href="http://msdn.microsoft.com/en-us/library/ff647545.aspx" rel="nofollow">Here</a> is a description about how to do that. You may simply open a http port and transfer them to your own server.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload