BatchingLogger.Log Method

Definition

Overloads

Log<TState>(LogLevel, EventId, TState, Exception, Func<TState,Exception,String>)

Writes a log entry.

Log<TState>(DateTimeOffset, LogLevel, EventId, TState, Exception, Func<TState,Exception,String>)

Log<TState>(LogLevel, EventId, TState, Exception, Func<TState,Exception,String>)

Writes a log entry.

public:
generic <typename TState>
 virtual void Log(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, TState state, Exception ^ exception, Func<TState, Exception ^, System::String ^> ^ formatter);
public void Log<TState> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, Exception exception, Func<TState,Exception,string> formatter);
abstract member Log : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * 'State * Exception * Func<'State, Exception, string> -> unit
override this.Log : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * 'State * Exception * Func<'State, Exception, string> -> unit
Public Sub Log(Of TState) (logLevel As LogLevel, eventId As EventId, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String))

Type Parameters

TState

The type of the object to be written.

Parameters

logLevel
LogLevel

Entry will be written on this level.

eventId
EventId

Id of the event.

state
TState

The entry to be written. Can be also an object.

exception
Exception

The exception related to this entry.

formatter
Func<TState,Exception,String>

Function to create a String message of the state and exception.

Implements

Applies to

Log<TState>(DateTimeOffset, LogLevel, EventId, TState, Exception, Func<TState,Exception,String>)

public:
generic <typename TState>
 void Log(DateTimeOffset timestamp, Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, TState state, Exception ^ exception, Func<TState, Exception ^, System::String ^> ^ formatter);
public void Log<TState> (DateTimeOffset timestamp, Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, Exception exception, Func<TState,Exception,string> formatter);
member this.Log : DateTimeOffset * Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * 'State * Exception * Func<'State, Exception, string> -> unit
Public Sub Log(Of TState) (timestamp As DateTimeOffset, logLevel As LogLevel, eventId As EventId, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String))

Type Parameters

TState

Parameters

timestamp
DateTimeOffset
logLevel
LogLevel
eventId
EventId
state
TState
exception
Exception
formatter
Func<TState,Exception,String>

Applies to