Exportar (0) Imprimir
Expandir Tudo

Propriedade DiagnosticMonitorConfiguration.Logs

[Este tópico é uma documentação de pré-lançamento e está sujeito a alterações em versões futuras. Os tópicos em branco são incluídos como espaços reservados.]

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

Namespace: Microsoft.WindowsAzure.Diagnostics
Assembly: Microsoft.WindowsAzure.Diagnostics (em microsoft.windowsazure.diagnostics.dll)

'Uso
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)

Valor de propriedade

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();
}


Todos os membros estáticos públicos (Compartilhados no Visual Basic) desse tipo são thread-safe. Quaisquer membros de instância não têm garantia de ser thread-safe.

Plataformas de desenvolvimento

Windows XP Professional com Service Pack 2 (SP2)

Plataformas de destino

Contribuições da comunidade

Mostrar:
© 2014 Microsoft