logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct LogEntry

    Value object representing a log entry.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.Logging.Domain.ValueObjects
    Assembly: Serenity.Global.Domain.dll
    Syntax
    public readonly struct LogEntry

    Constructors

    LogEntry(LogSeverity, string, string, string[], Exception, DateTime?)

    Initializes a new instance of the LogEntry struct.

    Declaration
    public LogEntry(LogSeverity severity, string message, string category = null, string[] tags = null, Exception exception = null, DateTime? utc = null)
    Parameters
    Type Name Description
    LogSeverity severity

    The severity level of the log entry.

    string message

    The message of the log entry.

    string category

    The category of the log entry.

    string[] tags

    The tags associated with the log entry.

    Exception exception

    The exception associated with the log entry, if any.

    DateTime? utc

    The UTC timestamp of the log entry. If null, the current UTC time will be used.

    Fields

    Category

    Declaration
    public readonly string Category
    Field Value
    Type Description
    string

    The category of the log entry.

    Exception

    Declaration
    public readonly Exception Exception
    Field Value
    Type Description
    Exception

    The exception associated with the log entry, if any.

    Message

    Declaration
    public readonly string Message
    Field Value
    Type Description
    string

    The message of the log entry.

    Severity

    Declaration
    public readonly LogSeverity Severity
    Field Value
    Type Description
    LogSeverity

    The severity level of the log entry.

    Tags

    Declaration
    public readonly string[] Tags
    Field Value
    Type Description
    string[]

    The tags associated with the log entry.

    Utc

    Declaration
    public readonly DateTime Utc
    Field Value
    Type Description
    DateTime

    The UTC timestamp of the log entry.

    In this article
    © 2026 Serenity. All Rights Reserved