Compartir a través de


OnDemandTransferOptions Class

 

Specifies options for an on-demand transfer.

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

Inheritance Hierarchy

System.Object
  Microsoft.WindowsAzure.Diagnostics.Management.OnDemandTransferOptions

Syntax

public class OnDemandTransferOptions
public ref class OnDemandTransferOptions 
type OnDemandTransferOptions = class end
Public Class OnDemandTransferOptions

Constructors

Name Description
System_CAPS_pubmethod OnDemandTransferOptions()

Properties

Name Description
System_CAPS_pubproperty From

Gets or sets the start of the time window for which event data is to be transferred.

System_CAPS_pubproperty LogLevelFilter

Gets or sets the filter level for event data that has been logged with level information.

System_CAPS_pubproperty NotificationQueueName

Gets or sets the name of the queue where transfer completion notification can optionally be sent.

System_CAPS_pubproperty To

Gets or sets the end of the time window for which event data is to be transferred.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

The OnDemandTransferOptions class is used to specify options for transferring diagnostic data from a role instance. For example, you can specify a time period for which to return results, as well as specify logging levels and a name for the notification queue in persistent storage.

Example

The following code snippet creates a complete OnDemandTransferOptions object and starts an on-demand transfer.

// Specify the on-demand transfer options for the diagnostic data.
OnDemandTransferOptions transferOptions = new OnDemandTransferOptions();

// Get data starting from an hour ago until now.
transferOptions.From = DateTime.UtcNow.AddHours(1.0);
transferOptions.To = DateTime.UtcNow;

// Specify only error-level logs.
transferOptions.LogLevelFilter = LogLevel.Error;

// Provide a name for the queue where completion messages will be stored.
transferOptions.NotificationQueueName = "wad-on-demand-transfers";

// Start a transfer of Windows event logs.
roleInstanceDiagnosticManager.BeginOnDemandTransfer(DataBufferName.PerformanceCounters, transferOptions);

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.WindowsAzure.Diagnostics.Management Namespace

Return to top