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

# Log Plugin

> Emit plugin envelopes to the EventDBX log output.

The log plugin writes plugin envelopes (event/state/schema) to the EventDBX log output. It’s useful for quick debugging or lightweight audit trails without configuring external transports. Configuration is stored at the system data root (for example `~/.eventdbx/plugins.json`), and publish targets can be specified per write if you only want selected events to reach the log sink.

## Configuration

Configure via CLI (definitions are stored in `~/.eventdbx/plugins.json`; no TOML editing needed):

```bash theme={null}
dbx plugin config log --name audit-log --level info --template "agg={aggregate} id={id} event={event}" --payload event-only
```

`template` controls event formatting; `{aggregate}`, `{id}`, and `{event}` placeholders are replaced. If state or schema are included via payload mode, they are logged as JSON.

## When to use

* Local debugging without extra infrastructure.
* Lightweight audit trails where log collectors (Splunk/Datadog/etc.) already ingest application logs.
