Class UnityLogProfile
Unity ScriptableObject implementation of ILogProfileDefinition that defines logging configuration profiles.
Manages default logger settings and routing configuration for mapping installers to specific loggers.
Namespace: Serenity.Logging.Infrastructure.Settings
Assembly: Serenity.UnityGlobal.Infrastructure.dll
Syntax
public class UnityLogProfile : ScriptableObject, ILogProfileDefinition, IFoundationSettings
Constructors
UnityLogProfile()
Declaration
public UnityLogProfile()
Fields
Guid
Declaration
public string Guid
Field Value
| Type | Description |
|---|---|
| string | The globally unique identifier for this log profile, auto-generated using ObjectUtils. |
Id
Declaration
public string Id
Field Value
| Type | Description |
|---|---|
| string | The unique identifier for this log profile. |
_defaultLoggerKey
Declaration
public string _defaultLoggerKey
Field Value
| Type | Description |
|---|---|
| string | The assembly-qualified name of the default logger type. |
_routes
Declaration
public List<UnityLogRoute> _routes
Field Value
| Type | Description |
|---|---|
| List<UnityLogRoute> | List of routing configurations that map installer types to specific logger implementations. |
Properties
DefaultLoggerKey
Gets the default logger key through the ILogProfileDefinition interface.
Declaration
public string DefaultLoggerKey { get; }
Property Value
| Type | Description |
|---|---|
| string | The default logger key string |
DefaultLoggerTypeName
Gets or sets the default logger type name for editor access.
Provides internal access to the default logger key with null safety.
Declaration
public string DefaultLoggerTypeName { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The default logger type name string |
MutableRoutes
Declaration
public List<UnityLogRoute> MutableRoutes { get; }
Property Value
| Type | Description |
|---|---|
| List<UnityLogRoute> | Gets the mutable list of routes for editor manipulation. |
Routes
Gets the read-only list of log routes through the ILogProfileDefinition interface.
Declaration
public IReadOnlyList<ILogRoute> Routes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ILogRoute> | The read-only list of ILogRoute instances |
Methods
GetRoute(Type)
Finds and returns the log route configuration for the specified installer type.
Searches routes by comparing both AssemblyQualifiedName and FullName for flexibility.
Declaration
public ILogRoute GetRoute(Type installerType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | installerType | The installer type to find a route for. |
Returns
| Type | Description |
|---|---|
| ILogRoute | The matching ILogRoute or null if not found or installerType is null. |