Skip to main content

LogEvent

The LogEvent class is a representation of a single log entry. It encapsulates all the information related to a specific logging event, including the message, severity, timestamp, and any associated context.

Properties​

PropertyDescription
LevelSeverity level of the log event.
CodeStable, application-specific code that identifies the type of event.
ContextCaller-supplied context information associated with the event.
ExException associated with the event, if any.
MessageMessage template for the event.
ArgsArguments used to format or enrich the message template.

See Also​

  • ILogger — Primary logging interface that consumes LogEvent instances.
  • ILogContext — Interface for providing contextual information attached to log events.
  • Logging Basics — Overview of structured logging and how log events are produced.