Share via


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

Definition

Makes a sampling decision for the provided 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

Type Parameters

TState

The type of the log entry state.

Parameters

logEntry
LogEntry<TState>

The log entry used to make the sampling decision for.

Returns

true if the log record should be sampled; otherwise, false.

Applies to