Sprache

LoggingSampler.ShouldSample<TState>(LogEntry<TState>) Methode

Definition

Trifft eine Stichprobenentscheidung für die bereitgestellte logEntry.

public:
generic <typename TState>
 abstract bool ShouldSample(Microsoft::Extensions::Logging::Abstractions::LogEntry<TState> ^ logEntry);
public abstract bool ShouldSample<TState>(in Microsoft.Extensions.Logging.Abstractions.LogEntry<TState> logEntry);
abstract member ShouldSample : LogEntry -> bool
Public MustOverride Function ShouldSample(Of TState) (logEntry As LogEntry(Of TState)) As Boolean

Typparameter

TState

Der Typ des Protokolleintragsstatus.

Parameter

logEntry
LogEntry<TState>

Der Protokolleintrag, der verwendet wird, um die Samplingentscheidung zu treffen.

Gibt zurück

truewenn der Protokolldatensatz stichprobeniert werden soll; andernfalls . false

Gilt für: