Partilhar via


OnDemandTransferOptions.LogLevelFilter Property

 

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

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

Syntax

public LogLevel LogLevelFilter { get; set; }
public:
property LogLevel LogLevelFilter {
    LogLevel get();
    void set(LogLevel value);
}
member LogLevelFilter : LogLevel with get, set
Public Property LogLevelFilter As LogLevel

Property Value

Type: Microsoft.WindowsAzure.Diagnostics.LogLevel

Type: Microsoft.WindowsAzure.Diagnostics.LogLevel

Returns LogLevel.

Remarks

The LogLevelFilter property specifies a LogLevel value by which to filter diagnostic data. If the logging level is set to Undefined, all data is transferred regardless of logging level.

Example

The following code snippet specifies that only error-level logs should be transferred:

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

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

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.

See Also

OnDemandTransferOptions Class
Microsoft.WindowsAzure.Diagnostics.Management Namespace

Return to top