Log level override configuration for runtime log management.

Used to dynamically change log levels for specific loggers or logger hierarchies without requiring application restart. Overrides are applied to the target logger and all child loggers whose names start with the override name.

Example: Creating Log Overrides

// Enable debug logging for all models
const modelDebugOverride: LogOverride = {
name: 'kos-ui-sdk.models',
level: 'debug',
type: 'UI',
id: 'models-debug'
};

// Enable error-only logging for performance
const performanceOverride: LogOverride = {
name: 'kos-ui-sdk.services.heavy-computation',
level: 'error',
type: 'UI',
id: 'perf-override'
};

// Troubleshooting override for specific component
const troubleshootOverride: LogOverride = {
name: 'kos-ui-sdk.models.log-stream',
level: 'trace',
type: 'UI',
id: 'log-stream-debug'
};

Example: Hierarchical Override Effects

// Setting 'kos-ui-sdk' affects all child loggers:
const rootOverride: LogOverride = {
name: 'kos-ui-sdk',
level: 'debug',
type: 'UI',
id: 'sdk-debug'
};

// This affects:
// - kos-ui-sdk.models.log-stream
// - kos-ui-sdk.models.log-block
// - kos-ui-sdk.services.api
// - kos-ui-sdk.core.events
// ... and all other loggers starting with 'kos-ui-sdk'
interface LogOverride {
    level: LogLevelNames;
    name: string;
    type: string;
    id: string;
}

Properties

Properties

Target log level to apply to the logger and its children.

All loggers whose names start with the 'name' property will be set to this level until the override is removed.

name: string

Logger name or prefix to target for the override.

The override applies to this exact logger name and all loggers whose names start with this string. Use hierarchical naming like 'kos-ui-sdk.models' to target groups of related loggers.

type: string

Type of override, typically 'UI' for KOS UI SDK overrides.

Used to categorize and filter overrides by their source or purpose. Different types can be managed separately.

id: string

Unique identifier for this override.

Used to track and remove specific overrides. Should be unique within the system to prevent conflicts.