Экспорт (0) Печать
Развернуть все

Свойство DiagnosticMonitorConfiguration.DiagnosticInfrastructureLogs

Gets or sets the buffer configuration for the logs generated by the underlying diagnostics infrastructure. The diagnostic infrastructure logs are useful for troubleshooting the diagnostics system itself.

Пространство имен: Microsoft.WindowsAzure.Diagnostics
Сборка: Microsoft.WindowsAzure.Diagnostics (в microsoft.windowsazure.diagnostics.dll)

'Применение
Dim instance As DiagnosticMonitorConfiguration
Dim value As BasicLogsBufferConfiguration

value = instance.DiagnosticInfrastructureLogs

instance.DiagnosticInfrastructureLogs = value

[EditorBrowsableAttribute(EditorBrowsableState.Advanced)] 
public BasicLogsBufferConfiguration DiagnosticInfrastructureLogs { get; set; }
/** @property */
/** @attribute CompilerGeneratedAttribute() */ 
public BasicLogsBufferConfiguration get_DiagnosticInfrastructureLogs ()

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

CompilerGeneratedAttribute 
public function get DiagnosticInfrastructureLogs () : BasicLogsBufferConfiguration

CompilerGeneratedAttribute 
public function set DiagnosticInfrastructureLogs (value : BasicLogsBufferConfiguration)

Значение свойства

Returns BasicLogsBufferConfiguration.

The DiagnosticInfrastructureLogs property is used to specify the BasicLogsBufferConfiguration data buffer that is used for logging the diagnostic infrastructure itself. 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 configuration for diagnostic infrastructure logs, then starts the diagnostic monitor using the new 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.DiagnosticInfrastructureLogs.ScheduledTransferLogLevelFilter = LogLevel.Error;

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

    // Specify a buffer quota.
    diagnosticConfiguration.DiagnosticInfrastructureLogs.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) члены этого типа являются потокобезопасными. Потокобезопасность членов экземпляров не гарантируется.

Платформы разработки

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Server 2008 и Windows 2000

Целевые платформы

Добавления сообщества

Показ:
© 2014 Microsoft