Search Results for

    Show / Hide Table of Contents

    Class LogEvent

    This class represents a logging event in the system.

    Inheritance
    object
    LogEvent
    Debug
    Error
    Info
    Warning
    Implements
    INoSerializationVerificationNeeded
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Akka.Event
    Assembly: Akka.dll
    Syntax
    public abstract class LogEvent : INoSerializationVerificationNeeded

    Constructors

    | Edit this page View Source

    LogEvent()

    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 Source

    ActivityContext

    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.

    | Edit this page View Source

    Cause

    The exception that caused the log event. Can be null

    Declaration
    public Exception Cause { get; protected set; }
    Property Value
    Type Description
    Exception
    | Edit this page View Source

    LogClass

    The type that generated this event.

    Declaration
    public Type LogClass { get; protected set; }
    Property Value
    Type Description
    Type
    | Edit this page View Source

    LogSource

    The source that generated this event.

    Declaration
    public string LogSource { get; protected set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Message

    The message associated with this event.

    Declaration
    public object Message { get; protected set; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    Thread

    The thread where this event occurred.

    Declaration
    public Thread Thread { get; }
    Property Value
    Type Description
    Thread
    | Edit this page View Source

    Timestamp

    The timestamp that this event occurred.

    Declaration
    public DateTime Timestamp { get; }
    Property Value
    Type Description
    DateTime

    Methods

    | Edit this page View Source

    LogLevel()

    Retrieves the LogLevel used to classify this event.

    Declaration
    public abstract LogLevel LogLevel()
    Returns
    Type Description
    LogLevel

    The LogLevel used to classify this event.

    | Edit this page View Source

    ToString()

    Returns a string that represents this LogEvent.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents this LogEvent.

    Overrides
    object.ToString()

    Implements

    INoSerializationVerificationNeeded

    Extension Methods

    LogEventExtensions.GetParameters(LogEvent)
    LogEventExtensions.GetPropertyNames(LogEvent)
    LogEventExtensions.GetTemplate(LogEvent)
    LogEventExtensions.TryGetProperties(LogEvent, out IReadOnlyDictionary<string, object>?)
    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET