logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class StructuredLogRecordSchema

    Field-name constants and schema builder for the structured log table. The single place that knows the log table's column names, mirroring Serenity.Leaderboard.Infrastructure.LeaderboardRecordMapping's role for the leaderboard table.

    Inheritance
    object
    StructuredLogRecordSchema
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.StructuredLogging.Infrastructure
    Assembly: Serenity.UnityStructuredLogging.Infrastructure.dll
    Syntax
    public static class StructuredLogRecordSchema

    Fields

    BuildVersionField

    Field name storing the application build version the record was written by.

    Declaration
    public const string BuildVersionField = "build_version"
    Field Value
    Type Description
    string

    CategoryField

    Field name storing LogEntry.Category.

    Declaration
    public const string CategoryField = "category"
    Field Value
    Type Description
    string

    DefaultTableName

    The default table or collection name used when the settings leave it blank.

    Declaration
    public const string DefaultTableName = "serenity_logs"
    Field Value
    Type Description
    string

    ExceptionField

    Field name storing LogEntry.Exception.ToString().

    Declaration
    public const string ExceptionField = "exception"
    Field Value
    Type Description
    string

    IdField

    Field name storing the store-assigned identity.

    Declaration
    public const string IdField = "id"
    Field Value
    Type Description
    string

    LogStreamField

    Field name storing the fixed partition every record is written under.

    Declaration
    public const string LogStreamField = "log_stream"
    Field Value
    Type Description
    string

    MessageField

    Field name storing LogEntry.Message.

    Declaration
    public const string MessageField = "message"
    Field Value
    Type Description
    string

    SequenceField

    Field name storing the client-side monotonically increasing write sequence, used as the trim/query tie-break for entries sharing the same UtcTicksField value. Populated on every record — unlike IdField, whose store-assigned identity only exists on backends with identity columns — so keep-newest trimming is deterministic on every backend, including the KeyValue-based LocalFile/PlayerPrefs ones.

    Declaration
    public const string SequenceField = "sequence"
    Field Value
    Type Description
    string

    SessionIdField

    Field name storing the process-lifetime session identifier stamped on every record of one app run, so all entries of a single run can be correlated after the fact.

    Declaration
    public const string SessionIdField = "session_id"
    Field Value
    Type Description
    string

    SeverityField

    Field name storing (long)LogEntry.Severity.

    Declaration
    public const string SeverityField = "severity"
    Field Value
    Type Description
    string

    SeverityNameField

    Field name storing LogEntry.Severity.ToString(), derived from the same enum value as SeverityField.

    Declaration
    public const string SeverityNameField = "severity_name"
    Field Value
    Type Description
    string

    TagsField

    Field name storing LogEntry.Tags, comma-joined.

    Declaration
    public const string TagsField = "tags"
    Field Value
    Type Description
    string

    UtcTicksField

    Field name storing Ticks of LogEntry.Utc.

    Declaration
    public const string UtcTicksField = "utc_ticks"
    Field Value
    Type Description
    string

    Methods

    BuildSchema(StoreTable)

    Builds the structured log table schema: fields, identity column, and the stream/timestamp index.

    Declaration
    public static StructuredTableSchema BuildSchema(StoreTable table)
    Parameters
    Type Name Description
    StoreTable table
    Returns
    Type Description
    StructuredTableSchema
    In this article
    © 2026 Serenity. All Rights Reserved