LogBuffer.TryEnqueue<TState> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enqueues a log record in the underlying buffer, if available.
public:
generic <typename TState>
abstract bool TryEnqueue(Microsoft::Extensions::Logging::Abstractions::IBufferedLogger ^ bufferedLogger, Microsoft::Extensions::Logging::Abstractions::LogEntry<TState> ^ logEntry);
public abstract bool TryEnqueue<TState>(Microsoft.Extensions.Logging.Abstractions.IBufferedLogger bufferedLogger, in Microsoft.Extensions.Logging.Abstractions.LogEntry<TState> logEntry);
abstract member TryEnqueue : Microsoft.Extensions.Logging.Abstractions.IBufferedLogger * LogEntry -> bool
Public MustOverride Function TryEnqueue(Of TState) (bufferedLogger As IBufferedLogger, logEntry As LogEntry(Of TState)) As Boolean
Type Parameters
- TState
Type of the log state in the logEntry
instance.
Parameters
- bufferedLogger
- IBufferedLogger
A logger capable of logging buffered log records.
- logEntry
- LogEntry<TState>
A log entry to be buffered.
Returns
true
if the log record was buffered; otherwise, false
.