Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​Extensions.​Logging.​LoggerMessageAttribute

Assembly: Microsoft.Extensions.Logging.Abstractions

Inheritance: object → System.​Attribute → LoggerMessageAttribute

Provides information to guide the production of a strongly typed logging method.

Remarks

<para>The method this attribute is applied to:</para> <para> - Must be a partial method.</para> <para> - Must return <c>void</c>.</para> <para> - Must not be generic.</para> <para> - Must have an <see cref="T:Microsoft.Extensions.Logging.ILogger" /> as one of its parameters.</para> <para> - Must have a <see cref="T:Microsoft.Extensions.Logging.LogLevel" /> as one of its parameters.</para> <para> - None of the parameters can be generic.</para>

Properties

public int
EventId
Gets or sets the logging event ID for the logging method.
public string
EventName
Gets or sets the logging event name for the logging method.
Remarks This will equal the method name if not specified.
public LogLevel
Level
Gets or sets the logging level for the logging method.
public string
Message
Gets or sets the message text for the logging method.
public bool
SkipEnabledCheck
Gets or sets the flag to skip IsEnabled check for the logging method.
public object
TypeId

Methods

public bool
Equals​(object obj)
Inherited from System.​Attribute
public int
GetHashCode​()
Inherited from System.​Attribute
public bool
IsDefaultAttribute​()
Inherited from System.​Attribute
public bool
Match​(object obj)
Inherited from System.​Attribute
protected void
Finalize​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object