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.​ILogger

Assembly: Microsoft.Extensions.Logging.Abstractions

Represents a type used to perform logging.

Remarks

Aggregates most logging patterns to a single method.

Methods

BeginScope​(TState state)
Begins a logical operation scope.
Returns An <see cref="T:System.IDisposable" /> that ends the logical operation scope on dispose.
state The identifier for the scope.
bool
IsEnabled​(LogLevel logLevel)
Checks if the given <paramref name="logLevel" /> is enabled.
Returns <see langword="true" /> if enabled.
logLevel Level to be checked.
void
Log​(LogLevel logLevel, EventId eventId, TState state, System.​Exception exception, System.​Func<​TState, System.​Exception, string> formatter)
Writes a log entry.
logLevel Entry will be written on this level.
eventId Id of the event.
state The entry to be written. Can be also an object.
exception The exception related to this entry.
formatter Function to create a <see cref="T:System.String" /> message of the <paramref name="state" /> and <paramref name="exception" /> .