logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class CreateStructuredLogServiceDTO

    DTO for creating a structured logging service instance with its resolved store and retention dependencies. Extends CreateLogServiceDTO to add the IStructuredStore backend, the table it writes into, and the retention/routing configuration used by UnityStructuredLogService.

    Inheritance
    object
    CreateStructuredLogServiceDTO
    Namespace: Serenity.StructuredLogging.Application.Interfaces.Factories.Dto
    Assembly: Serenity.UnityStructuredLogging.Infrastructure.dll
    Syntax
    public class CreateStructuredLogServiceDTO : CreateLogServiceDTO

    Constructors

    CreateStructuredLogServiceDTO(string, ILogSettings, IStructuredStore, StoreTable, string, int, bool, bool, string)

    Initializes structured logging service creation DTO with dependencies and configuration.

    Declaration
    public CreateStructuredLogServiceDTO(string serviceName, ILogSettings settings, IStructuredStore store, StoreTable table, string streamId, int maxRecords, bool trimOnEveryInsert, bool mirrorToConsole, string buildVersion)
    Parameters
    Type Name Description
    string serviceName

    Name of the logging service for identification.

    ILogSettings settings

    Log settings configuration for filtering and formatting.

    IStructuredStore store

    The resolved structured store backend records are written to.

    StoreTable table

    The table or collection records are written into.

    string streamId

    The single fixed partition every record is written under and trimmed within.

    int maxRecords

    The number of newest records kept per stream when trimming is enabled.

    bool trimOnEveryInsert

    Whether every insert also trims the stream down to maxRecords.

    bool mirrorToConsole

    Whether every log entry is also echoed to the console.

    string buildVersion

    The application build version stamped on every record, captured on the main thread.

    Properties

    BuildVersion

    Declaration
    public string BuildVersion { get; }
    Property Value
    Type Description
    string

    The application build version stamped on every record. Captured on the main thread by the installer (a Unity API cannot be read from a background continuation); null or empty maps to a null column value.

    MaxRecords

    Declaration
    public int MaxRecords { get; }
    Property Value
    Type Description
    int

    The number of newest records kept per StreamId when TrimOnEveryInsert is enabled.

    MirrorToConsole

    Declaration
    public bool MirrorToConsole { get; }
    Property Value
    Type Description
    bool

    Whether every log entry is also echoed to the console, in addition to being persisted.

    Store

    Declaration
    public IStructuredStore Store { get; }
    Property Value
    Type Description
    IStructuredStore

    The resolved structured store backend records are written to.

    StreamId

    Declaration
    public string StreamId { get; }
    Property Value
    Type Description
    string

    The single fixed partition every record is written under and trimmed within.

    Table

    Declaration
    public StoreTable Table { get; }
    Property Value
    Type Description
    StoreTable

    The table or collection records are written into.

    TrimOnEveryInsert

    Declaration
    public bool TrimOnEveryInsert { get; }
    Property Value
    Type Description
    bool

    Whether every insert also trims the stream down to MaxRecords.

    In this article
    © 2026 Serenity. All Rights Reserved