# Diagnostics

Bounded, content-free local logs.

## Inspect the log


```ts
const db = createClient({
  namespace: "my-app",
  relays,
  diagnostics: { capacity: 200, onEntry: entry => console.log(entry) },
});
const entries = db.diagnostics.list();
const listener = db.diagnostics.events$.subscribe(entry => console.log(entry));
db.diagnostics.clear();
listener.unsubscribe();
```

The buffer keeps up to `capacity` entries, from 1 to 10,000. Set `enabled: false` to disable it. SDK entries contain request counts, event IDs/kinds, acknowledgement counts, error codes, and passive connection state. They exclude record bodies, decrypted private data, secret keys, and auth tokens. Your callbacks must decide what they save. This is local diagnostics, not hosted logs.
