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

# Logging & log levels

> What Sariva logs, how to read it, and how to turn the volume up or down.

Sariva emits **structured JSON logs** (one event per line) to the container's stdout. There is no log-destination setting and no file output — shipping the stream into CloudWatch, Loki, Datadog, or EFK is your platform's job, with whatever shipper you already run. Every line is a key-value event, grep-able and queryable, not a free-text sentence:

```json theme={null}
{"timestamp": "2026-08-17T09:12:35.120552Z", "level": "info", "logger": "platform.background.per_app_alert_engine", "event": "alert_fired", "agent": "observability", "app": "payments-consumer", "alert_type": "lag_threshold", "severity": "P2"}
```

## The two knobs

Logging is configured by **two environment variables**, read once at process startup:

| Variable | Accepted values | Default | Notes |
| - | - | - | - |
| `LOG_LEVEL` | `DEBUG` \| `INFO` \| `WARNING` \| `ERROR` (case-insensitive) | `INFO` | An unrecognised value falls back to `INFO` with a startup warning — a typo never blocks boot |
| `LOG_FORMAT` | `json` \| `console` | `json` | Any value other than `console` is treated as `json`. Keep `json` in real environments — `console` is coloured human-readable output for local development, and its escape codes pollute log aggregation pipelines |

⚠WARNING

**These are environment variables, not config-file keys.** `customer_config.yaml` has no logging settings — its `platform:` block accepts only `db_path`, and the schema is strict, so pasting `log_level` or `log_format` there makes the whole file **fail validation**. Set logging through `values.yaml` / the pod environment (Kubernetes) or `.env` (VM/Docker) as shown below.

## Log levels

| Level | What it covers |
| - | - |
| `ERROR` | A tool permanently failed; an unhandled error at the API boundary |
| `WARNING` | Threshold exceeded (lag, CPU), retries, degraded-mode operation |
| `INFO` | Agent started/finished, tool called, approval requested/granted, PR created, action executed *(default)* |
| `DEBUG` | LLM prompt/response previews, per-node graph transitions *(very high volume)* |

`DEBUG` is set the same way as any other level (`LOG_LEVEL=DEBUG`). It is loud enough to swamp a log pipeline, so turn it on only for a short debugging window — or narrow it to one subsystem with a per-subsystem override (below) instead of going global.

## Change the level

**Linux VM (Docker) path** — `LOG_LEVEL` and `LOG_FORMAT` are lines in the wizard-emitted `.env` (from the wizard's Step 2 answers). Edit them there, then recreate the container so it re-reads the file:

```bash theme={null}
# .env
LOG_LEVEL=WARNING    # DEBUG | INFO | WARNING | ERROR
LOG_FORMAT=json      # json | console
```

```bash theme={null}
docker compose up -d --force-recreate
docker compose logs -f platform
```

**Kubernetes paths** — in `values.yaml`; the chart writes these into the pod's ConfigMap as `LOG_LEVEL` / `LOG_FORMAT`:

```yaml theme={null}
platform:
  logLevel: WARNING   # DEBUG | INFO | WARNING | ERROR
  logFormat: json     # json | console
```

```bash theme={null}
helm upgrade sariva-platform helm/sariva-platform -n sariva-platform --reuse-values --set platform.logLevel=WARNING
```

The chart's checksum annotation rolls the pod on the config change, so the new level applies as the pod comes back.

Or as a one-off, without editing `values.yaml`:

```bash theme={null}
kubectl -n sariva-platform set env deployment/sariva-platform LOG_LEVEL=WARNING
```

You should see `deployment.apps/sariva-platform env updated` and the pod restart. Note this edits the live Deployment directly — the next `helm upgrade` re-renders the Deployment and reverts it.

ⓘINFO

**A restart is required.** The level is read once at startup; there is no hot-reload. Both commands above restart the pod for you, so no extra step is needed — just don't expect a running pod to pick up a changed value on its own.

## Per-subsystem overrides

To make one subsystem verbose while the rest stays quiet, set an override alongside the global level:

```
LOG_LEVEL_OVERRIDE_<namespace>=<LEVEL>
```

For example, `LOG_LEVEL_OVERRIDE_platform.llm=DEBUG` with a global `LOG_LEVEL=WARNING` gives you debug-verbose LLM events only. Set overrides durably via the chart's `extraEnv:` list in `values.yaml`, or one-off via `kubectl set env`; on the VM path, add the override as a line in `.env` and recreate the container. An override with an invalid level is logged and skipped. Applied at startup, same restart rule as above.

ⓘINFO

**The audit trail is never filtered.** Audit events (`platform.tools.audit`) are always written at `INFO`, regardless of `LOG_LEVEL` and regardless of any override targeting that namespace — lowering the level to cut noise never suppresses the forensic record.

## What to watch for

* `alert_engine_tick` / `adapter_invoked` — the [alert engine](https://sariva.mintlify.site/concepts/alerting.md) is alive, and what each check found.
* `alert_fired` — an alert condition was hit; `alert_type` names the check (e.g. `lag_threshold`, `lag_increasing_pct`, `pod_restart`).
* `tool_execute_unhandled_exception` and other `error`-level events — a tool call failed (includes the exception).
* `graph_node_transition` *(DEBUG)* — why the agent routed the way it did.

Logger names are dotted namespace identifiers (`platform.agents`, `platform.tools.<name>`, `platform.llm`, `platform.background`, …), so you can filter by subsystem in your aggregator. They are stable string identifiers, decoupled from the Python package layout.

## Continue

> [card] [Hand-author values.yaml](https://sariva.mintlify.site/reference/hand-authoring-config.md)
>
> Where `platform.logLevel` and `platform.logFormat` sit in a hand-written `values.yaml`.

> [card] [Back to deployment path](https://sariva.mintlify.site/deploy/aws-eks-cc.md)
>
> Return to the supported deployment path checklist.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.