共用方式為


OrleansLoggerExtension.Error 方法

定義

多載

Error(ILogger, ErrorCode, String, Exception)
Error(ILogger, Int32, String, Exception)

在錯誤層級寫入記錄專案

Error(ILogger, ErrorCode, String, Exception)

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

參數

logger
ILogger
logCode
ErrorCode
message
String
exception
Exception

適用於

Error(ILogger, Int32, String, Exception)

來源:
ILoggerExtensions.cs

在錯誤層級寫入記錄專案

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

參數

logger
ILogger

記錄器

logCode
Int32

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

message
String

要記錄的錯誤訊息。

exception
Exception

與錯誤相關的例外狀況,如果有的話。

適用於