Compartir a través de


ILogger.Log Method

Definition

Overloads

Log(LogLevel, String, Object[])

Writes a log entry.

Log(LogLevel, EventId, String, Object[])

Writes a log entry.

Log(LogLevel, Exception, String, Object[])

Writes a log entry.

Log(LogLevel, EventId, Exception, String, Object[])

Writes a log entry.

Log<TState>(LogLevel, EventId, TState, Exception, Func<TState,Exception,String>)

Writes a log entry.

Log(LogLevel, String, Object[])

Writes a log entry.

public:
 void Log(Microsoft::Xrm::Sdk::PluginTelemetry::LogLevel logLevel, System::String ^ message, ... cli::array <System::Object ^> ^ args);
public void Log (Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel logLevel, string message, params object[] args);
abstract member Log : Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel * string * obj[] -> unit
Public Sub Log (logLevel As LogLevel, message As String, ParamArray args As Object())

Parameters

logLevel
LogLevel

Entry will be written on this level.

message
String

Format string of the scope message.

args
Object[]

An object array that contains zero or more objects to format.

Applies to

Log(LogLevel, EventId, String, Object[])

Writes a log entry.

public:
 void Log(Microsoft::Xrm::Sdk::PluginTelemetry::LogLevel logLevel, Microsoft::Xrm::Sdk::PluginTelemetry::EventId ^ eventId, System::String ^ message, ... cli::array <System::Object ^> ^ args);
public void Log (Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel logLevel, Microsoft.Xrm.Sdk.PluginTelemetry.EventId eventId, string message, params object[] args);
abstract member Log : Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel * Microsoft.Xrm.Sdk.PluginTelemetry.EventId * string * obj[] -> unit
Public Sub Log (logLevel As LogLevel, eventId As EventId, message As String, ParamArray args As Object())

Parameters

logLevel
LogLevel

Entry will be written on this level.

eventId
EventId

Id of the event.

message
String

Format string of the scope message.

args
Object[]

An object array that contains zero or more objects to format.

Applies to

Log(LogLevel, Exception, String, Object[])

Writes a log entry.

public:
 void Log(Microsoft::Xrm::Sdk::PluginTelemetry::LogLevel logLevel, Exception ^ exception, System::String ^ message, ... cli::array <System::Object ^> ^ args);
public void Log (Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel logLevel, Exception exception, string message, params object[] args);
abstract member Log : Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel * Exception * string * obj[] -> unit
Public Sub Log (logLevel As LogLevel, exception As Exception, message As String, ParamArray args As Object())

Parameters

logLevel
LogLevel

Entry will be written on this level.

exception
Exception

The exception related to this entry.

message
String

Format string of the scope message.

args
Object[]

An object array that contains zero or more objects to format.

Applies to

Log(LogLevel, EventId, Exception, String, Object[])

Writes a log entry.

public:
 void Log(Microsoft::Xrm::Sdk::PluginTelemetry::LogLevel logLevel, Microsoft::Xrm::Sdk::PluginTelemetry::EventId ^ eventId, Exception ^ exception, System::String ^ message, ... cli::array <System::Object ^> ^ args);
public void Log (Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel logLevel, Microsoft.Xrm.Sdk.PluginTelemetry.EventId eventId, Exception exception, string message, params object[] args);
abstract member Log : Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel * Microsoft.Xrm.Sdk.PluginTelemetry.EventId * Exception * string * obj[] -> unit
Public Sub Log (logLevel As LogLevel, eventId As EventId, exception As Exception, message As String, ParamArray args As Object())

Parameters

logLevel
LogLevel

Entry will be written on this level.

eventId
EventId

Id of the event.

exception
Exception

The exception related to this entry.

message
String

Format string of the scope message.

args
Object[]

An object array that contains zero or more objects to format.

Applies to

Log<TState>(LogLevel, EventId, TState, Exception, Func<TState,Exception,String>)

Writes a log entry.

public:
generic <typename TState>
 void Log(Microsoft::Xrm::Sdk::PluginTelemetry::LogLevel logLevel, Microsoft::Xrm::Sdk::PluginTelemetry::EventId ^ eventId, TState state, Exception ^ exception, Func<TState, Exception ^, System::String ^> ^ formatter);
public void Log<TState> (Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel logLevel, Microsoft.Xrm.Sdk.PluginTelemetry.EventId eventId, TState state, Exception exception, Func<TState,Exception,string> formatter);
abstract member Log : Microsoft.Xrm.Sdk.PluginTelemetry.LogLevel * Microsoft.Xrm.Sdk.PluginTelemetry.EventId * 'State * Exception * Func<'State, Exception, string> -> unit
Public Sub Log(Of TState) (logLevel As LogLevel, eventId As EventId, state As TState, exception As Exception, formatter As Func(Of TState, Exception, String))

Type Parameters

TState

Parameters

logLevel
LogLevel

Entry will be written on this level.

eventId
EventId

Id of the event.

state
TState

The entry to be written. Can be also an object.

exception
Exception

The exception related to this entry.

formatter
Func<TState,Exception,String>

Function to create a String message of the state and exception.

Applies to