Share via


RoleInstanceDiagnosticManager.GetCurrentConfiguration Method ()

 

Gets the current diagnostic monitor configuration for a role instance.

Namespace:   Microsoft.WindowsAzure.Diagnostics.Management
Assembly:  Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)

Syntax

public DiagnosticMonitorConfiguration GetCurrentConfiguration()
public:
DiagnosticMonitorConfiguration^ GetCurrentConfiguration()
member GetCurrentConfiguration : unit -> DiagnosticMonitorConfiguration
Public Function GetCurrentConfiguration As DiagnosticMonitorConfiguration

Return Value

Type: Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorConfiguration

Type: Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorConfiguration

A DiagnosticMonitorConfiguration object.

Remarks

The GetCurrentConfiguration method is used to return the current DiagnosticMonitorConfiguration object for a role instance.

Example

The following code snippet gets the current diagnostic monitor configuration for the role instance:

// Get the diagnostic monitor for the specified role instance.
RoleInstanceDiagnosticManager roleInstanceDiagnosticManager = 
         new RoleInstanceDiagnosticManager(myStorageAccount, 
                                           "28281fc7754b44faa9ccf4911983edf1",
                                           "MyWebRole",
                                           "deployment(1).MyAzureProject.WebRole1.0");

// Get the current diagnostic monitor for the role.
DiagnosticMonitorConfiguration currentConfiguration = roleInstanceDiagnosticManager.GetCurrentConfiguration();

Warning

This API is not supported in Azure SDK versions 2.5 and higher. Instead, use the diagnostics.wadcfg XML configuration file. For more information, see Collect Logging Data by Using Azure Diagnostics.

See Also

RoleInstanceDiagnosticManager Class
Microsoft.WindowsAzure.Diagnostics.Management Namespace

Return to top