LoggingSampler.ShouldSample<TState>(LogEntry<TState>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
對所提供的 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