LoggerMessage.Define 方法

定义

重载

Define(LogLevel, EventId, String)

创建可调用以记录消息的委托。

Define(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

Define<T1,T2,T3,T4,T5,T6>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

Define<T1,T2,T3,T4,T5,T6>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

Define<T1,T2,T3,T4,T5>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

Define<T1,T2,T3,T4,T5>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

Define<T1,T2,T3,T4>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

Define<T1,T2,T3,T4>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

Define<T1,T2,T3>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

Define<T1,T2,T3>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

Define<T1,T2>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

Define<T1,T2>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

Define<T1>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

Define<T1>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

Define(LogLevel, EventId, String)

创建可调用以记录消息的委托。

public:
 static Action<Microsoft::Extensions::Logging::ILogger ^, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,Exception> Define (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,Exception?> Define (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string -> Action<Microsoft.Extensions.Logging.ILogger, Exception>
Public Shared Function Define (logLevel As LogLevel, eventId As EventId, formatString As String) As Action(Of ILogger, Exception)

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

调用时会创建日志消息的委托。

适用于

Define(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

public:
 static Action<Microsoft::Extensions::Logging::ILogger ^, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString, Microsoft::Extensions::Logging::LogDefineOptions ^ options);
public static Action<Microsoft.Extensions.Logging.ILogger,Exception?> Define (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString, Microsoft.Extensions.Logging.LogDefineOptions? options);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string * Microsoft.Extensions.Logging.LogDefineOptions -> Action<Microsoft.Extensions.Logging.ILogger, Exception>
Public Shared Function Define (logLevel As LogLevel, eventId As EventId, formatString As String, options As LogDefineOptions) As Action(Of ILogger, Exception)

参数

logLevel
LogLevel

日志记录级别。

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

options
LogDefineOptions

日志定义选项。

返回

调用时创建日志消息的委托。

适用于

Define<T1,T2,T3,T4,T5,T6>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, T3, T4, T5, T6, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString, Microsoft::Extensions::Logging::LogDefineOptions ^ options);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,T4,T5,T6,Exception?> Define<T1,T2,T3,T4,T5,T6> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString, Microsoft.Extensions.Logging.LogDefineOptions? options);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string * Microsoft.Extensions.Logging.LogDefineOptions -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, 'T3, 'T4, 'T5, 'T6, Exception>
Public Shared Function Define(Of T1, T2, T3, T4, T5, T6) (logLevel As LogLevel, eventId As EventId, formatString As String, options As LogDefineOptions) As Action(Of ILogger, T1, T2, T3, T4, T5, T6, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

T3

传递给命名格式字符串的第三个参数的类型。

T4

传递给命名格式字符串的第四个参数的类型。

T5

传递给命名格式字符串的第五个参数的类型。

T6

传递给命名格式字符串的第六个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

Action<ILogger,T1,T2,T3,T4,T5,T6,Exception>

调用时创建日志消息的委托。

适用于

Define<T1,T2,T3,T4,T5,T6>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, T3, T4, T5, T6, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,T4,T5,T6,Exception> Define<T1,T2,T3,T4,T5,T6> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,T4,T5,T6,Exception?> Define<T1,T2,T3,T4,T5,T6> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, 'T3, 'T4, 'T5, 'T6, Exception>
Public Shared Function Define(Of T1, T2, T3, T4, T5, T6) (logLevel As LogLevel, eventId As EventId, formatString As String) As Action(Of ILogger, T1, T2, T3, T4, T5, T6, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

T3

传递给命名格式字符串的第三个参数的类型。

T4

传递给命名格式字符串的第四个参数的类型。

T5

传递给命名格式字符串的第五个参数的类型。

T6

传递给命名格式字符串的第六个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

Action<ILogger,T1,T2,T3,T4,T5,T6,Exception>

调用时会创建日志消息的委托。

适用于

Define<T1,T2,T3,T4,T5>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, T3, T4, T5, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString, Microsoft::Extensions::Logging::LogDefineOptions ^ options);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,T4,T5,Exception?> Define<T1,T2,T3,T4,T5> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString, Microsoft.Extensions.Logging.LogDefineOptions? options);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string * Microsoft.Extensions.Logging.LogDefineOptions -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, 'T3, 'T4, 'T5, Exception>
Public Shared Function Define(Of T1, T2, T3, T4, T5) (logLevel As LogLevel, eventId As EventId, formatString As String, options As LogDefineOptions) As Action(Of ILogger, T1, T2, T3, T4, T5, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

T3

传递给命名格式字符串的第三个参数的类型。

T4

传递给命名格式字符串的第四个参数的类型。

T5

传递给命名格式字符串的第五个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

Action<ILogger,T1,T2,T3,T4,T5,Exception>

调用时创建日志消息的委托。

适用于

Define<T1,T2,T3,T4,T5>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2, typename T3, typename T4, typename T5>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, T3, T4, T5, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,T4,T5,Exception> Define<T1,T2,T3,T4,T5> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,T4,T5,Exception?> Define<T1,T2,T3,T4,T5> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, 'T3, 'T4, 'T5, Exception>
Public Shared Function Define(Of T1, T2, T3, T4, T5) (logLevel As LogLevel, eventId As EventId, formatString As String) As Action(Of ILogger, T1, T2, T3, T4, T5, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

T3

传递给命名格式字符串的第三个参数的类型。

T4

传递给命名格式字符串的第四个参数的类型。

T5

传递给命名格式字符串的第五个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

Action<ILogger,T1,T2,T3,T4,T5,Exception>

调用时会创建日志消息的委托。

适用于

Define<T1,T2,T3,T4>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2, typename T3, typename T4>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, T3, T4, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,T4,Exception> Define<T1,T2,T3,T4> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,T4,Exception?> Define<T1,T2,T3,T4> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, 'T3, 'T4, Exception>
Public Shared Function Define(Of T1, T2, T3, T4) (logLevel As LogLevel, eventId As EventId, formatString As String) As Action(Of ILogger, T1, T2, T3, T4, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

T3

传递给命名格式字符串的第三个参数的类型。

T4

传递给命名格式字符串的第四个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

Action<ILogger,T1,T2,T3,T4,Exception>

调用时会创建日志消息的委托。

适用于

Define<T1,T2,T3,T4>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2, typename T3, typename T4>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, T3, T4, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString, Microsoft::Extensions::Logging::LogDefineOptions ^ options);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,T4,Exception?> Define<T1,T2,T3,T4> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString, Microsoft.Extensions.Logging.LogDefineOptions? options);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string * Microsoft.Extensions.Logging.LogDefineOptions -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, 'T3, 'T4, Exception>
Public Shared Function Define(Of T1, T2, T3, T4) (logLevel As LogLevel, eventId As EventId, formatString As String, options As LogDefineOptions) As Action(Of ILogger, T1, T2, T3, T4, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

T3

传递给命名格式字符串的第三个参数的类型。

T4

传递给命名格式字符串的第四个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

Action<ILogger,T1,T2,T3,T4,Exception>

调用时创建日志消息的委托。

适用于

Define<T1,T2,T3>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2, typename T3>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, T3, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,Exception> Define<T1,T2,T3> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,Exception?> Define<T1,T2,T3> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, 'T3, Exception>
Public Shared Function Define(Of T1, T2, T3) (logLevel As LogLevel, eventId As EventId, formatString As String) As Action(Of ILogger, T1, T2, T3, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

T3

传递给命名格式字符串的第三个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

调用时会创建日志消息的委托。

适用于

Define<T1,T2,T3>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2, typename T3>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, T3, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString, Microsoft::Extensions::Logging::LogDefineOptions ^ options);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,T3,Exception?> Define<T1,T2,T3> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString, Microsoft.Extensions.Logging.LogDefineOptions? options);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string * Microsoft.Extensions.Logging.LogDefineOptions -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, 'T3, Exception>
Public Shared Function Define(Of T1, T2, T3) (logLevel As LogLevel, eventId As EventId, formatString As String, options As LogDefineOptions) As Action(Of ILogger, T1, T2, T3, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

T3

传递给命名格式字符串的第三个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

调用时会创建日志消息的委托。

适用于

Define<T1,T2>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,Exception> Define<T1,T2> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,Exception?> Define<T1,T2> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, Exception>
Public Shared Function Define(Of T1, T2) (logLevel As LogLevel, eventId As EventId, formatString As String) As Action(Of ILogger, T1, T2, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

调用时会创建日志消息的委托。

适用于

Define<T1,T2>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

public:
generic <typename T1, typename T2>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, T2, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString, Microsoft::Extensions::Logging::LogDefineOptions ^ options);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,T2,Exception?> Define<T1,T2> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString, Microsoft.Extensions.Logging.LogDefineOptions? options);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string * Microsoft.Extensions.Logging.LogDefineOptions -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, 'T2, Exception>
Public Shared Function Define(Of T1, T2) (logLevel As LogLevel, eventId As EventId, formatString As String, options As LogDefineOptions) As Action(Of ILogger, T1, T2, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

T2

传递给命名格式字符串的第二个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

调用时会创建日志消息的委托。

适用于

Define<T1>(LogLevel, EventId, String, LogDefineOptions)

创建可调用以记录消息的委托。

public:
generic <typename T1>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString, Microsoft::Extensions::Logging::LogDefineOptions ^ options);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,Exception?> Define<T1> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString, Microsoft.Extensions.Logging.LogDefineOptions? options);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string * Microsoft.Extensions.Logging.LogDefineOptions -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, Exception>
Public Shared Function Define(Of T1) (logLevel As LogLevel, eventId As EventId, formatString As String, options As LogDefineOptions) As Action(Of ILogger, T1, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

参数

logLevel
LogLevel

日志记录级别。

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

options
LogDefineOptions

日志定义选项。

返回

调用时会创建日志消息的委托。

适用于

Define<T1>(LogLevel, EventId, String)

创建可调用以记录消息的委托。

public:
generic <typename T1>
 static Action<Microsoft::Extensions::Logging::ILogger ^, T1, Exception ^> ^ Define(Microsoft::Extensions::Logging::LogLevel logLevel, Microsoft::Extensions::Logging::EventId eventId, System::String ^ formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,Exception> Define<T1> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
public static Action<Microsoft.Extensions.Logging.ILogger,T1,Exception?> Define<T1> (Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString);
static member Define : Microsoft.Extensions.Logging.LogLevel * Microsoft.Extensions.Logging.EventId * string -> Action<Microsoft.Extensions.Logging.ILogger, 'T1, Exception>
Public Shared Function Define(Of T1) (logLevel As LogLevel, eventId As EventId, formatString As String) As Action(Of ILogger, T1, Exception)

类型参数

T1

传递给命名格式字符串的第一个参数的类型。

参数

logLevel
LogLevel

LogLevel

eventId
EventId

事件 ID。

formatString
String

已命名的格式字符串。

返回

调用时会创建日志消息的委托。

适用于