匯出 (0) 列印
全部展開

DiagnosticMonitorConfiguration.Logs 屬性

Gets or sets the buffer configuration for basic Windows Azure logs captured by the Windows Azure Trace Listener.

命名空間: Microsoft.WindowsAzure.Diagnostics
組件: Microsoft.WindowsAzure.Diagnostics (在 microsoft.windowsazure.diagnostics.dll 中)

'用途
Dim instance As DiagnosticMonitorConfiguration
Dim value As BasicLogsBufferConfiguration

value = instance.Logs

instance.Logs = value

public BasicLogsBufferConfiguration Logs { get; set; }
/** @property */
/** @attribute CompilerGeneratedAttribute() */ 
public BasicLogsBufferConfiguration get_Logs ()

/** @property */
/** @attribute CompilerGeneratedAttribute() */ 
public void set_Logs (BasicLogsBufferConfiguration value)

CompilerGeneratedAttribute 
public function get Logs () : BasicLogsBufferConfiguration

CompilerGeneratedAttribute 
public function set Logs (value : BasicLogsBufferConfiguration)

屬性值

Returns BasicLogsBufferConfiguration.

The Logs property is used to specify the BasicLogsBufferConfiguration data buffer that is used for Windows Azure logs. This property enables you to set the ScheduledTransferLogLevelFilter property, as well as the default data buffer properties: BufferQuotaInMB and ScheduledTransferPeriod.

Example

The following code snippet creates a new diagnostic monitor configuration, specifies the log configuration for Windows Azure logs, and starts the diagnostic monitor using the updated configuration.

public override bool OnStart()
{
    // Get the default initial configuration for DiagnosticMonitor.
    DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration();

    // Filter the logs so that only error-level logs are transferred to persistent storage.
    diagnosticConfiguration.Logs.ScheduledTransferLogLevelFilter = LogLevel.Error;

    // Schedule a transfer period of 30 minutes.
    diagnosticConfiguration.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(30.0);

    // Specify a buffer quota of 1GB.
    diagnosticConfiguration.Logs.BufferQuotaInMB = 1024;

    // Start the DiagnosticMonitor using the diagnosticConfig and our connection string.
    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagnosticConfiguration);

    return base.OnStart();
}


任何這個類型的公用靜態 (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。 並非所有的執行個體成員都是安全執行緒。

開發平台

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

目標平台

社群新增項目

Microsoft 正展開一份線上問卷調查,了解您對於 MSDN 網站的看法。 如果您選擇參加,您離開 MSDN 網站時即會顯示線上問卷調查。

您是否想要參加?
顯示:
© 2014 Microsoft