共用方式為


LogEntry<TState> 建構函式

定義

使用指定的記錄層級、類別、事件識別碼、狀態、例外狀況和格式器參數,建立新的 LogEntry<TState>

public:
 LogEntry(Microsoft::Extensions::Logging::LogLevel logLevel, System::String ^ category, Microsoft::Extensions::Logging::EventId eventId, TState state, Exception ^ exception, Func<TState, Exception ^, System::String ^> ^ formatter);
public LogEntry (Microsoft.Extensions.Logging.LogLevel logLevel, string category, Microsoft.Extensions.Logging.EventId eventId, TState state, Exception? exception, Func<TState,Exception?,string> formatter);
new Microsoft.Extensions.Logging.Abstractions.LogEntry<'State> : Microsoft.Extensions.Logging.LogLevel * string * Microsoft.Extensions.Logging.EventId * 'State * Exception * Func<'State, Exception, string> -> Microsoft.Extensions.Logging.Abstractions.LogEntry<'State>
Public Sub New (logLevel As LogLevel, category As String, eventId As EventId, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String))

參數

logLevel
LogLevel

記錄層級。

category
String

記錄的類別名稱。

eventId
EventId

記錄事件識別碼。

state
TState

正在寫入的記錄狀態。

exception
Exception

記錄例外狀況。

formatter
Func<TState,Exception,String>

格式器。

適用於