Class LogEvent
This class represents a logging event in the system.
Implements
Inherited Members
Namespace: Akka.Event
Assembly: Akka.dll
Syntax
public abstract class LogEvent : INoSerializationVerificationNeeded
Constructors
| Edit this page View SourceLogEvent()
Initializes a new instance of the LogEvent class.
Declaration
protected LogEvent()
Remarks
Captures Current trace context at creation time. This enables log correlation with distributed traces even after the log event crosses actor mailbox boundaries (where Current would be lost).
Properties
| Edit this page View SourceActivityContext
The trace context from Current captured at log event creation time.
Declaration
public ActivityContext? ActivityContext { get; }
Property Value
| Type | Description |
|---|---|
| ActivityContext? |
Remarks
This value is captured before the log event crosses actor mailbox boundaries,
enabling trace correlation with OpenTelemetry and other distributed tracing systems.
Will be null if no Activity was active when the log event was created.
Cause
The exception that caused the log event. Can be null
Declaration
public Exception Cause { get; protected set; }
Property Value
| Type | Description |
|---|---|
| Exception |
LogClass
The type that generated this event.
Declaration
public Type LogClass { get; protected set; }
Property Value
| Type | Description |
|---|---|
| Type |
LogSource
The source that generated this event.
Declaration
public string LogSource { get; protected set; }
Property Value
| Type | Description |
|---|---|
| string |
Message
The message associated with this event.
Declaration
public object Message { get; protected set; }
Property Value
| Type | Description |
|---|---|
| object |
Thread
The thread where this event occurred.
Declaration
public Thread Thread { get; }
Property Value
| Type | Description |
|---|---|
| Thread |
Timestamp
The timestamp that this event occurred.
Declaration
public DateTime Timestamp { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
Methods
| Edit this page View SourceLogLevel()
Retrieves the LogLevel used to classify this event.
Declaration
public abstract LogLevel LogLevel()
Returns
| Type | Description |
|---|---|
| LogLevel | The LogLevel used to classify this event. |
ToString()
Returns a string that represents this LogEvent.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents this LogEvent. |
Edit this page