Bu sayfa faydalı mıydı?
Bu içerik hakkındaki geri bildiriminiz önemli. Ne düşündüğünüzü bilmemize izin verin.
İlave geri bildirim?
1500 karakter kaldı
MSDN Library
EN
Bu içerik dilinizde bulunmamaktadır ancak İngilizce sürümüne buradan bakabilirsiniz.

DataBufferName Enumeration

 

Updated: April 22, 2013

Enumeration of each data buffer type.

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

public enum DataBufferName

Member nameDescription
DiagnosticInfrastructureLogs

Indicates the data buffer for logs generated by the underlying diagnostics infrastructure itself.

Directories

Inidicates the data buffer for file-based logs.

Logs

Indicates the data buffer for Windows Azure logs.

PerformanceCounters

Indicates the data buffer for performance counters.

WindowsEventLogs

Indicates 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 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);
System_CAPS_warningWarning

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.

Return to top
Show:
© 2015 Microsoft