Bagikan melalui


Logger<T>.ILogger.Log<TState> Metode

Definisi

Menulis entri log.

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

Jenis parameter

TState

Jenis objek yang akan ditulis.

Parameter

logLevel
LogLevel

Entri akan ditulis pada tingkat ini.

eventId
EventId

Id peristiwa.

state
TState

Entri yang akan ditulis. Bisa juga objek.

exception
Exception

Pengecualian yang terkait dengan entri ini.

formatter
Func<TState,Exception,String>

Fungsi untuk membuat pesan String dari state dan exception.

Penerapan

Berlaku untuk