Dela via


LoggerMessageAttribute Constructors

Definition

Overloads

LoggerMessageAttribute()

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

LoggerMessageAttribute(LogLevel)

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

LoggerMessageAttribute(String)

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

LoggerMessageAttribute(LogLevel, String)

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

LoggerMessageAttribute(Int32, LogLevel, String)

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

LoggerMessageAttribute()

Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

public:
 LoggerMessageAttribute();
public LoggerMessageAttribute ();
Public Sub New ()

Applies to

LoggerMessageAttribute(LogLevel)

Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

public:
 LoggerMessageAttribute(Microsoft::Extensions::Logging::LogLevel level);
public LoggerMessageAttribute (Microsoft.Extensions.Logging.LogLevel level);
new Microsoft.Extensions.Logging.LoggerMessageAttribute : Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.LoggerMessageAttribute
Public Sub New (level As LogLevel)

Parameters

level
LogLevel

The log level.

Applies to

LoggerMessageAttribute(String)

Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

public:
 LoggerMessageAttribute(System::String ^ message);
public LoggerMessageAttribute (string message);
new Microsoft.Extensions.Logging.LoggerMessageAttribute : string -> Microsoft.Extensions.Logging.LoggerMessageAttribute
Public Sub New (message As String)

Parameters

message
String

Format string of the log message.

Applies to

LoggerMessageAttribute(LogLevel, String)

Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

public:
 LoggerMessageAttribute(Microsoft::Extensions::Logging::LogLevel level, System::String ^ message);
public LoggerMessageAttribute (Microsoft.Extensions.Logging.LogLevel level, string message);
new Microsoft.Extensions.Logging.LoggerMessageAttribute : Microsoft.Extensions.Logging.LogLevel * string -> Microsoft.Extensions.Logging.LoggerMessageAttribute
Public Sub New (level As LogLevel, message As String)

Parameters

level
LogLevel

The log level.

message
String

Format string of the log message.

Applies to

LoggerMessageAttribute(Int32, LogLevel, String)

Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs
Source:
LoggerMessageAttribute.cs

Initializes a new instance of the LoggerMessageAttribute class that's used to guide the production of a strongly typed logging method.

public:
 LoggerMessageAttribute(int eventId, Microsoft::Extensions::Logging::LogLevel level, System::String ^ message);
public LoggerMessageAttribute (int eventId, Microsoft.Extensions.Logging.LogLevel level, string message);
new Microsoft.Extensions.Logging.LoggerMessageAttribute : int * Microsoft.Extensions.Logging.LogLevel * string -> Microsoft.Extensions.Logging.LoggerMessageAttribute
Public Sub New (eventId As Integer, level As LogLevel, message As String)

Parameters

eventId
Int32

The log event ID.

level
LogLevel

The log level.

message
String

Format string of the log message.

Applies to