# Logs

Every web service on Koo produces a live log stream you can read in the console. Koo captures everything your service writes to standard output and standard error — no agent or logging library required.

## View a service's logs

1. 
2. 
3. 
4.

When a service is failing at runtime, the error shown on it carries a **View logs** button. It opens the Logs tab windowed around the moment of the failure, so the lines you need are already on screen.

## Databases have no Logs tab

A [Postgres](/docs/databases/postgres) or [Redis](/docs/databases/redis) database has no Logs tab — it doesn't expose a log stream. A database's operational logs are Koo's to watch, not yours.

Your view into a database is its [metrics](/docs/observability/metrics) and its [status](/docs/observability/status).

## The account-wide stream

The account pages have a **Logs** page of their own: one combined stream across every service in the account, each line attributed to the service that wrote it. It reads the same three ways as the per-service tab:

- 
- 
-

Filter chips scope the stream to a single project, environment, or service. In between the two scopes, each environment's rail also has a **Logs** page — a combined recent window across that environment's services, merged by timestamp, with a service filter and search.

The per-service and account-wide streams are available programmatically through the [observability API](/api/observability), authenticated with an [API token](/docs/developers/api-tokens); the environment's Logs page is a console view built on the per-service stream.

## Retention

How far back you can read depends on your plan — each plan's log retention window is listed in [usage & limits](/docs/account/usage-and-limits). Requests beyond your window are clamped to it.

> **Note:**
>
> Logs older than your plan's retention window are gone — there is no archive to restore from. If you need logs long-term, forward them to your own log store from inside your service.

## Logs from the CLI

The [Koo CLI](/docs/developers/cli) prints the linked service's recent logs:

```bash
koo logs
```

Add `-f` to follow the stream, `--since` to set the window (for example `--since 1h`), and `--filter` to keep only lines containing a string:

```bash
koo logs -f --since 30m --filter "error"
```

## Build logs are separate

Everything on this page describes **runtime logs**: output from your running service. **Build logs** are the output of turning your source into an image — they land on the [deployment](/docs/deploy/deployments-and-rollback) that ran the build, in the service's Deployments tab. See [builds](/docs/deploy/builds).

Deploys that ship a prebuilt image have no build step and no build logs.

## Tips

- 
- 
- 
-
