Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DataBufferName Enumeration

Enumeration of each data buffer type.

Namespace: Microsoft.WindowsAzure.Diagnostics
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)
'Usage

'Declaration
Public Enumeration DataBufferName
Member nameDescription
DiagnosticInfrastructureLogsIndicates the data buffer for logs generated by the underlying diagnostics infrastructure itself.
DirectoriesInidicates the data buffer for file-based logs.
LogsIndicates the data buffer for Windows Azure logs.
PerformanceCountersIndicates the data buffer for performance counters.
WindowsEventLogsIndicates the data buffer for Windows event logs.

The DataBufferName enumeration is used to specify a data buffer when starting or stopping an on-demand transfer of logging data. Specifically, this enumeration is used for the BeginOnDemandTransfer(DataBufferName) and CancelOnDemandTransfers methods. For example, the following code snippet starts a transfer of performance counter logs for the specified role instance:

// Get the connection string. It's recommended that you store the connection string in your web.config or app.config file.
// Use the ConfigurationManager type to retrieve your storage connection string.  You can find the account name and key in
// the Windows Azure Management Portal (http://manage.windowsazure.com).
//string connectionString = "DefaultEndpointsProtocol=https;AccountName=<AccountName>;AccountKey=<AccountKey>";
string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["StorageConnectionString"].ConnectionString;

// The deployment ID, role name, and role instance ID for your application 
// can be obtained from the Windows Azure Management Portal (http://manage.windowsazure.com).  
// See your application dashboard under Cloud Services.
string deploymentID = "e2ab8b6667644666ba627bdf6f5e4daa";
string roleName = "WebRole1";
string roleInstanceId = "WebRole1_IN_0";

// Get the DeploymentDiagnosticManager object for your deployment.
DeploymentDiagnosticManager deploymentDiagnosticManager = new DeploymentDiagnosticManager(connectionString, deploymentID);

// Get the diagnostic manager for the specified role instance.
RoleInstanceDiagnosticManager roleInstanceDiagnosticManager = deploymentDiagnosticManager.GetRoleInstanceDiagnosticManager(roleName, roleInstanceId);

// Begin the on-demand transfer of performance counter logs.
roleInstanceDiagnosticManager.BeginOnDemandTransfer(DataBufferName.PerformanceCounters);

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.