語言

LoggingSampler.ShouldSample<TState>(LogEntry<TState>) 方法

定義

對所提供的 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

類型參數

TState

日誌輸入狀態的類型。

參數

logEntry
LogEntry<TState>

日誌條目用於做出抽樣決定。

傳回

true如果日誌記錄應該被取樣;否則,。 false

適用於