导出 (0) 打印
全部展开

OnDemandTransferOptions 类

Specifies options for an on-demand transfer.

命名空间: Microsoft.WindowsAzure.Diagnostics.Management
程序集: Microsoft.WindowsAzure.Diagnostics(在 microsoft.windowsazure.diagnostics.dll 中)

用法
Dim instance As OnDemandTransferOptions

声明
Public Class OnDemandTransferOptions
public class OnDemandTransferOptions
public class OnDemandTransferOptions

The OnDemandTransferOptions class is used to specify options for transferring diagnostic data from a role instance. For example, you can specify a time period from 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);


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

此类型的任何公共静态(在 Visual Basic 中为 Shared)成员都是线程安全的。但不保证所有实例成员都是线程安全的。

开发平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003、Windows Server 2008 和 Windows 2000

目标平台

社区附加资源

显示:
© 2014 Microsoft