ILogger.Log<TState>(LogLevel, EventId, TState, Exception, Func<TState,Exception,String>) メソッド

定義

ログ エントリを書き込みます。Writes a log entry.

public:
generic <typename TState>
 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
Public Sub Log(Of TState) (logLevel As LogLevel, eventId As EventId, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String))

型パラメーター

TState

書き込むオブジェクトの型。The type of the object to be written.

パラメーター

logLevel
LogLevel

エントリはこのレベルで書き込まれます。Entry will be written on this level.

eventId
EventId

イベントの ID。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>

stateexceptionString メッセージを作成する関数。Function to create a String message of the state and exception.

適用対象