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

# Logging Architecture

> Layering of logging, audit, and observability data in AiOS and the requirement to externalize state.

# Logging Architecture

## Audience

This page is for developers and operators responsible for troubleshooting, audit, task tracing, and runtime governance.

## Goal and Scope

This page separates logging, audit, and observability responsibilities.

## Core Concepts

### logging

logging is for diagnosis and runtime troubleshooting.

### audit

audit is for security, accountability, and compliance.

### observability

observability is for runtime health, metrics, and tracing.

### Task and Approval

* Task remains the durable tracking model for long-running execution progress, state, and result.
* Approval remains the decision and audit record for high-risk actions; it does not replace Task execution tracking.

## Standard Workflow

A production mutation typically emits all three layers: logging, audit, and observability.

## Planned CLI Example (Not Yet Implemented)

The repository does not currently ship this log-query subcommand. It remains illustrative of how a future CLI should consume the same logging and audit model.

```bash theme={null}
aios app logs my-api --env prod
```

## Web UI Path

* platform logging view
* audit center
* task details with execution logs and state

## Pitfalls / Risk Notes

* audit is not just another application log stream
* if task, approval, or installer events live only in memory, audit and replay guarantees fail
* audit records without Task execution tracking are still insufficient for long-running work recovery and replay

## Related Pages

* [Backup Model](/en/platform/backup-model)
* [Authentication and Authorization Model](/en/operations/authn-authz)
