LogEntry<TState> 构造函数

定义

使用指定的日志级别、类别、事件 ID、状态、异常和格式化程序参数创建新 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

日志事件 ID。

state
TState

正在写入日志的状态。

exception
Exception

日志异常。

formatter
Func<TState,Exception,String>

格式化程序。

适用于