> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tai42.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Logging (tai42_kit.logging)

> Structured logging settings and setup.

Logging settings + setup, co-located with the logging util.

Side-effect-free on import: the consumer calls `setup_logging(...)` explicitly
(e.g. at app startup) — importing this package configures nothing on its own.

## LoggingSettings

`tai42_kit.logging.settings.LoggingSettings`

```python theme={null}
class LoggingSettings(TaiBaseSettings)
```

**Attributes**

| Attribute      | Type  |
| -------------- | ----- |
| `model_config` | —     |
| `log_level`    | `str` |

### Members

#### validate\_log\_level

`tai42_kit.logging.settings.LoggingSettings.validate_log_level`

```python theme={null}
validate_log_level(cls, v: str) -> str
```

**Parameters**

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `v`       | `str` | —       | —           |

#### is\_enabled\_for

`tai42_kit.logging.settings.LoggingSettings.is_enabled_for`

```python theme={null}
is_enabled_for(self, level_name: str) -> bool
```

**Parameters**

| Parameter    | Type  | Default | Description |
| ------------ | ----- | ------- | ----------- |
| `level_name` | `str` | —       | —           |

## logging\_settings

`tai42_kit.logging.settings.logging_settings`

```python theme={null}
logging_settings() -> LoggingSettings
```

## setup\_logging

`tai42_kit.logging.logger.setup_logging`

```python theme={null}
setup_logging(settings: LoggingSettings) -> None
```

Configure the ROOT logger for an application.

Call this from application startup only — never on library import, since it
reconfigures the process-global root logger. `force=True` replaces the
existing root handlers, so a repeat call (e.g. after a settings reload)
applies the new level instead of being silently ignored.

**Parameters**

| Parameter  | Type              | Default | Description |
| ---------- | ----------------- | ------- | ----------- |
| `settings` | `LoggingSettings` | —       | —           |
