ConsoleLogger.Log<TState> メソッド

定義

ログ エントリを書き込みます。

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))

型パラメーター

TState

パラメーター

logLevel
LogLevel

エントリはこのレベルで書き込まれます。

eventId
EventId

イベントの ID。

state
TState

書き込まれるエントリ。 オブジェクトも指定できます。

exception
Exception

このエントリに関連する例外。

formatter
Func<TState,Exception,String>

stateexceptionString メッセージを作成する関数。

実装

適用対象