Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Microsoft.​Extensions.​Logging.​Abstractions.​IBufferedLogger
Assembly: Microsoft.Extensions.Logging.Abstractions
Represents the ability of a logging provider to support buffered logging.
Remarks
A logging provider implements the <see cref="T:Microsoft.Extensions.Logging.ILogger" /> interface that gets invoked by the
logging infrastructure whenever it’s time to log a piece of state.
A logging provider may also optionally implement the <see cref="T:Microsoft.Extensions.Logging.Abstractions.IBufferedLogger" /> interface.
The logging infrastructure may type-test the <see cref="T:Microsoft.Extensions.Logging.ILogger" /> object to determine if
it supports the <see cref="T:Microsoft.Extensions.Logging.Abstractions.IBufferedLogger" /> interface. If it does, that indicates to the
logging infrastructure that the logging provider supports buffering. Whenever log
buffering is enabled, buffered log records may be delivered to the logging provider
in a batch via <see cref="M:Microsoft.Extensions.Logging.Abstractions.IBufferedLogger.LogRecords(System.Collections.Generic.IEnumerable{Microsoft.Extensions.Logging.Abstractions.BufferedLogRecord})" /> .
If a logging provider does not support log buffering, then it will always be given
unbuffered log records. If a logging provider does support log buffering, whether its
<see cref="T:Microsoft.Extensions.Logging.ILogger" /> or <see cref="T:Microsoft.Extensions.Logging.Abstractions.IBufferedLogger" /> implementation is used is
determined by the log producer.
Methods
void
LogRecords​(System.​Collections.​Generic.​IEnumerable<​BufferedLogRecord> records)
Delivers a batch of buffered log records to a logging provider.
records
The buffered log records to log.
Remarks
Once this function returns, the implementation should no longer access the records
or state referenced by these records since the instances may be reused to represent other logs.