# Logs

Structured logs powered by Evlog, with Explorer, Stream, and a data inspector.

Hosts: Local development, existing backends.

:hero-figure{name="logs"}

:::framework{name="Nuxt"}
```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['vite-hub/nuxt'],
  vitehub: { host: 'node', observability: { logs: true } },
})
```
:::
:::framework{name="Nitro"}
```ts [vite.config.ts]
import { nitro } from 'nitro/vite'
import { defineConfig } from 'vite'
import { vitehub } from 'vite-hub'

export default defineConfig({
  plugins: [
    vitehub({ host: 'node', observability: { logs: true } }),
    nitro(),
  ],
})
```
:::
:::framework{name="Vite"}
```ts [vite.config.ts]
import { defineConfig } from 'vite'
import { vitehub } from 'vite-hub'

export default defineConfig({
  plugins: [vitehub({ host: 'node', observability: { logs: true } })],
})
```
:::

ViteHub Logs uses Evlog for structured request events. Keep Evlog's logger API, framework adapters, options, and drains. ViteHub adds a read contract, Console inspection, and CLI access.

### [Start locally](https://vitehub.dev/docs/logs/get-started)

Add fields to one request event and see it in the Console.
### [Keep your pipeline](https://vitehub.dev/docs/logs/configure#read-an-existing-backend)

Read from your existing backend without a second exporter.
### [Inspect structured data](https://vitehub.dev/docs/logs/server-api)

Search events in Explorer or Stream and open their fields in the inspector.
### [Know the limits](https://vitehub.dev/docs/logs/limits-and-errors)

Local retention is temporary. Follow polls the source and can miss events.

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/logs.md) (this page)
- [Get started](https://vitehub.dev/raw/docs/logs/get-started.md)
- [Configure](https://vitehub.dev/raw/docs/logs/configure.md)
- [Server API](https://vitehub.dev/raw/docs/logs/server-api.md)
- [Hosts](https://vitehub.dev/raw/docs/logs/hosts.md)
- [Limits and errors](https://vitehub.dev/raw/docs/logs/limits-and-errors.md)

Next: [Get started](https://vitehub.dev/raw/docs/logs/get-started.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
