共用方式為


OrleansLoggerExtension.Warn 方法

定義

多載

Warn(ILogger, ErrorCode, String, Exception)
Warn(ILogger, ErrorCode, String, Object[])
Warn(ILogger, Int32, String, Exception)

在警告層級寫入記錄專案

Warn(ILogger, Int32, String, Object[])

在警告層級寫入記錄專案

Warn(ILogger, ErrorCode, String, Exception)

來源:
ILoggerExtensions.cs
public static void Warn (this Microsoft.Extensions.Logging.ILogger logger, Orleans.ErrorCode logCode, string message, Exception exception = default);
static member Warn : Microsoft.Extensions.Logging.ILogger * Orleans.ErrorCode * string * Exception -> unit
<Extension()>
Public Sub Warn (logger As ILogger, logCode As ErrorCode, message As String, Optional exception As Exception = Nothing)

參數

logger
ILogger
logCode
ErrorCode
message
String
exception
Exception

適用於

Warn(ILogger, ErrorCode, String, Object[])

來源:
ILoggerExtensions.cs
public static void Warn (this Microsoft.Extensions.Logging.ILogger logger, Orleans.ErrorCode logCode, string format, params object[] args);
static member Warn : Microsoft.Extensions.Logging.ILogger * Orleans.ErrorCode * string * obj[] -> unit
<Extension()>
Public Sub Warn (logger As ILogger, logCode As ErrorCode, format As String, ParamArray args As Object())

參數

logger
ILogger
logCode
ErrorCode
format
String
args
Object[]

適用於

Warn(ILogger, Int32, String, Exception)

來源:
ILoggerExtensions.cs

在警告層級寫入記錄專案

public static void Warn (this Microsoft.Extensions.Logging.ILogger logger, int logCode, string message, Exception exception = default);
static member Warn : Microsoft.Extensions.Logging.ILogger * int * string * Exception -> unit
<Extension()>
Public Sub Warn (logger As ILogger, logCode As Integer, message As String, Optional exception As Exception = Nothing)

參數

logger
ILogger

記錄器

logCode
Int32

與此訊息相關聯的記錄程式碼。

message
String

要記錄的警告訊息。

exception
Exception

與警告相關的例外狀況,如果有的話。

適用於

Warn(ILogger, Int32, String, Object[])

來源:
ILoggerExtensions.cs

在警告層級寫入記錄專案

public static void Warn (this Microsoft.Extensions.Logging.ILogger logger, int logCode, string format, params object[] args);
static member Warn : Microsoft.Extensions.Logging.ILogger * int * string * obj[] -> unit
<Extension()>
Public Sub Warn (logger As ILogger, logCode As Integer, format As String, ParamArray args As Object())

參數

logger
ILogger

記錄器

logCode
Int32

與此訊息相關聯的記錄程式碼。

format
String

使用具名參數格式化記錄訊息的字串。不一定適合 String.Format 。 如需詳細資訊,請參閱 Microsoft.Extensions.Logging MessageTemplate 一節。 建議在此擴充方法上使用其模式

args
Object[]

格式字串的任何引數。

適用於