> For the complete documentation index, see [llms.txt](https://dreamliner.gitbook.io/dreamliner-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dreamliner.gitbook.io/dreamliner-docs/docs/plugins/logs.md).

# Logs plugin

Clean logging for server activity and moderation actions. The logs plugin has no commands - it listens to Discord events and posts messages to configured channels.

## Configuration

```yaml
# Server events: joins, leaves, message edits/deletes, voice activity, nickname/role changes
server_log_channel_id: "1234567890123456789"

# Moderation: infractions, automod, censor, cleans, voice mod, case updates
moderation_log_channel_id: "1234567890123456789"
```

The legacy `log_channel_id` field still works as a fallback for moderation logs if `moderation_log_channel_id` is not set.

Infraction case logs can optionally use a dedicated channel via `plugins.infractions.config.case_log_channel`, which overrides `moderation_log_channel_id` for case-related lines only.

## Message tracking

While the bot is running, messages in servers with `server_log_channel_id` set are saved to the database. If a message is deleted after a bot restart, Dreamliner can still log the delete using the stored author, channel, and content.

Messages are retained for **42 days**. Bot messages are not tracked.

## Log layout

Each log is a **Components v2** message styled like command responses:

* Colorless **container**
* **Section** with the member's avatar thumbnail (when available)
* Bold **title** (e.g. **📥 Join**)
* **Information** block with labeled fields: Member, Target, Moderator, Channel, etc.
* **Member**, **Target**, and **Moderator** use clickable mentions with ID in backticks: `<@user> (`id`)`
* **Channel** fields use clickable channel mentions: `<#channel> (`id`)`
* **Role** changes use role mentions with IDs in backticks
* **Separator** + extra block for message content or before/after edits

No @mentions are used and `allowedMentions` is disabled on every log message.

## Server log events

| Event                 | Title              |
| --------------------- | ------------------ |
| Member join           | 📥 Join            |
| Member leave          | 📤 Leave           |
| Message edit          | 📝 Edit Message    |
| Message delete        | 🗑️ Delete Message |
| Voice join/leave/move | 🔊 / 🔇 / 🔀       |
| Nickname change       | 📝 Nickname Change |
| Role change           | 🎭 Role Change     |

Bot accounts are excluded from member and message logs.

## Moderation log events

| Source                                  | Title                               |
| --------------------------------------- | ----------------------------------- |
| `/warn`, `/mute`, `/ban`, etc.          | ⚠️ Warn #42, 🔇 Mute #43, …         |
| `/infraction reason\|duration\|delete`  | 📝 Case Update, 🔴 Case Delete      |
| `/clean`                                | 🧼 Clean                            |
| Automod (spam, rate limit, raid)        | 🤖 Automod, 🚨 Raid Detected        |
| Censor (word filter)                    | 🚫 Censor                           |
| `/voice move`, `move-all`, `disconnect` | 🔀 Voice Move, 🔇 Voice Disconnect  |
| Mute/tempban expiry                     | 🔊 Mute Expired, ✅ Temp Ban Expired |
| Failed DMs                              | 🚧 DM Failed                        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://dreamliner.gitbook.io/dreamliner-docs/docs/plugins/logs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
