Class UnityStructuredLogSettings
Unity-specific ScriptableObject configuration for the structured log sink.
Extends UnityLogSettings with the retention and routing configuration used when writing log
entries into a queryable IStructuredStore-backed table. One settings asset configures one
sink instance; the backend is selected by the shared, consumer-agnostic asset assigned to
Backend. The Id identifies the instance for
routing via the structured:{Id} logger key when multiple instances are installed.
Namespace: Serenity.StructuredLogging.Infrastructure.Settings
Assembly: Serenity.UnityStructuredLogging.Infrastructure.dll
Syntax
public class UnityStructuredLogSettings : UnityLogSettings
Constructors
UnityStructuredLogSettings()
Declaration
public UnityStructuredLogSettings()
Fields
Backend
Declaration
public UnityStructuredBackendDefinition Backend
Field Value
| Type | Description |
|---|---|
| UnityStructuredBackendDefinition | The backend records are written to, selected by the concrete type of the shared UnityStructuredBackendDefinition asset (LocalFile/PlayerPrefs/Sqlite/Http/ Postgres/MySql/Mongo). Left unassigned, the sink boots with the built-in LocalFile backend using its defaults. |
MaxRecords
Declaration
public int MaxRecords
Field Value
| Type | Description |
|---|---|
| int | The number of newest records kept per StreamId when TrimOnEveryInsert is enabled. |
MirrorToConsole
Declaration
public bool MirrorToConsole
Field Value
| Type | Description |
|---|---|
| bool | Whether every log entry is also echoed to the console, in addition to being persisted. |
StreamId
Declaration
public string StreamId
Field Value
| Type | Description |
|---|---|
| string | The single fixed partition every record is written under and trimmed within. |
TableOrCollectionName
Declaration
public string TableOrCollectionName
Field Value
| Type | Description |
|---|---|
| string | Table or collection name storing structured log records. |
TrimOnEveryInsert
Declaration
public bool TrimOnEveryInsert
Field Value
| Type | Description |
|---|---|
| bool | Whether every insert also trims the stream down to MaxRecords. Disable for SQL-heavy setups that trim on a schedule instead. |