LoggerExtensions.LogDebug 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
LogDebug(ILogger, String, Object[]) |
设置调试日志消息格式并写入该消息。 |
LogDebug(ILogger, EventId, String, Object[]) |
设置调试日志消息格式并写入该消息。 |
LogDebug(ILogger, Exception, String, Object[]) |
设置调试日志消息格式并写入该消息。 |
LogDebug(ILogger, EventId, Exception, String, Object[]) |
设置调试日志消息格式并写入该消息。 |
LogDebug(ILogger, String, Object[])
- Source:
- LoggerExtensions.cs
- Source:
- LoggerExtensions.cs
- Source:
- LoggerExtensions.cs
设置调试日志消息格式并写入该消息。
public:
[System::Runtime::CompilerServices::Extension]
static void LogDebug(Microsoft::Extensions::Logging::ILogger ^ logger, System::String ^ message, ... cli::array <System::Object ^> ^ args);
public static void LogDebug (this Microsoft.Extensions.Logging.ILogger logger, string message, params object[] args);
public static void LogDebug (this Microsoft.Extensions.Logging.ILogger logger, string? message, params object?[] args);
static member LogDebug : Microsoft.Extensions.Logging.ILogger * string * obj[] -> unit
<Extension()>
Public Sub LogDebug (logger As ILogger, message As String, ParamArray args As Object())
参数
- message
- String
采用消息模板格式的日志消息的格式字符串。 示例: "User {User} logged in from {Address}"
- args
- Object[]
一个对象数组,其中包含零个或多个要设置格式的对象。
示例
logger.LogDebug("Processing request from {Address}", address)
适用于
LogDebug(ILogger, EventId, String, Object[])
- Source:
- LoggerExtensions.cs
- Source:
- LoggerExtensions.cs
- Source:
- LoggerExtensions.cs
设置调试日志消息格式并写入该消息。
public:
[System::Runtime::CompilerServices::Extension]
static void LogDebug(Microsoft::Extensions::Logging::ILogger ^ logger, Microsoft::Extensions::Logging::EventId eventId, System::String ^ message, ... cli::array <System::Object ^> ^ args);
public static void LogDebug (this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, string message, params object[] args);
public static void LogDebug (this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, string? message, params object?[] args);
static member LogDebug : Microsoft.Extensions.Logging.ILogger * Microsoft.Extensions.Logging.EventId * string * obj[] -> unit
<Extension()>
Public Sub LogDebug (logger As ILogger, eventId As EventId, message As String, ParamArray args As Object())
参数
- eventId
- EventId
与日志关联的事件 ID。
- message
- String
采用消息模板格式的日志消息的格式字符串。 示例: "User {User} logged in from {Address}"
- args
- Object[]
一个对象数组,其中包含零个或多个要设置格式的对象。
示例
logger.LogDebug(0, "Processing request from {Address}", address)
适用于
LogDebug(ILogger, Exception, String, Object[])
- Source:
- LoggerExtensions.cs
- Source:
- LoggerExtensions.cs
- Source:
- LoggerExtensions.cs
设置调试日志消息格式并写入该消息。
public:
[System::Runtime::CompilerServices::Extension]
static void LogDebug(Microsoft::Extensions::Logging::ILogger ^ logger, Exception ^ exception, System::String ^ message, ... cli::array <System::Object ^> ^ args);
public static void LogDebug (this Microsoft.Extensions.Logging.ILogger logger, Exception exception, string message, params object[] args);
public static void LogDebug (this Microsoft.Extensions.Logging.ILogger logger, Exception? exception, string? message, params object?[] args);
static member LogDebug : Microsoft.Extensions.Logging.ILogger * Exception * string * obj[] -> unit
<Extension()>
Public Sub LogDebug (logger As ILogger, exception As Exception, message As String, ParamArray args As Object())
参数
- exception
- Exception
要记录的异常。
- message
- String
采用消息模板格式的日志消息的格式字符串。 示例: "User {User} logged in from {Address}"
- args
- Object[]
一个对象数组,其中包含零个或多个要设置格式的对象。
示例
logger.LogDebug(exception, "Error while processing request from {Address}", address)
适用于
LogDebug(ILogger, EventId, Exception, String, Object[])
- Source:
- LoggerExtensions.cs
- Source:
- LoggerExtensions.cs
- Source:
- LoggerExtensions.cs
设置调试日志消息格式并写入该消息。
public:
[System::Runtime::CompilerServices::Extension]
static void LogDebug(Microsoft::Extensions::Logging::ILogger ^ logger, Microsoft::Extensions::Logging::EventId eventId, Exception ^ exception, System::String ^ message, ... cli::array <System::Object ^> ^ args);
public static void LogDebug (this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, Exception exception, string message, params object[] args);
public static void LogDebug (this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, Exception? exception, string? message, params object?[] args);
static member LogDebug : Microsoft.Extensions.Logging.ILogger * Microsoft.Extensions.Logging.EventId * Exception * string * obj[] -> unit
<Extension()>
Public Sub LogDebug (logger As ILogger, eventId As EventId, exception As Exception, message As String, ParamArray args As Object())
参数
- eventId
- EventId
与日志关联的事件 ID。
- exception
- Exception
要记录的异常。
- message
- String
采用消息模板格式的日志消息的格式字符串。 示例: "User {User} logged in from {Address}"
- args
- Object[]
一个对象数组,其中包含零个或多个要设置格式的对象。
示例
logger.LogDebug(0, exception, "Error while processing request from {Address}", address)