Logging Guide
Configure comprehensive event logging for messages, members, moderation, roles, channels, and voice.
Overview
Lyx's logging system captures server events and sends them to a designated channel. Each event category can be enabled/disabled independently. Logs include relevant details like user, channel, before/after values, and timestamps.
Initial Setup
/logs setup channel:#mod-logs
Then enable event categories:
/logs events message_edits:true message_deletes:true member_joins:true member_leaves:true moderation:true role_changes:true channel_changes:true nickname_changes:true voice_states:false invite_create:true invite_delete:true
Enable master logging:
In the dashboard, use the master toggle and configure each category.
Event Categories
Message Events
| Event | Logged Data |
|---|---|
| Message Sent | Author, channel, content (truncated), attachments |
| Message Edited | Author, channel, before/after content, jump link |
| Message Deleted | Author, channel, deleted content, attachments |
| Bulk Delete | Channel, count, deleted messages preview |
Enable: message_edits, message_deletes, bulk_delete
Member Events
| Event | Logged Data |
|---|---|
| Member Joined | User, account age, member count, avatar |
| Member Left | User, roles, member count, join date |
| Member Banned | User, moderator, reason, case ID |
| Member Unbanned | User, moderator, reason |
| Member Timed Out | User, moderator, duration, reason, case ID |
| Timeout Removed | User, moderator, reason |
Enable: member_joins, member_leaves, member_bans, member_timeouts
Moderation Events
All moderation commands create detailed logs:
- Action type, moderator, target, reason
- Case ID for cross-reference
- Duration for timeouts
- Message count for purges
Enable: moderation
Role & Channel Events
| Event | Logged Data |
|---|---|
| Role Created | Role, creator, permissions, color |
| Role Deleted | Role, deleter |
| Role Updated | Role, changer, before/after (name, color, permissions, hoist, mentionable) |
| Channel Created | Channel, creator, type, category |
| Channel Deleted | Channel, deleter |
| Channel Updated | Channel, changer, before/after (name, topic, nsfw, bitrate, permissions) |
Enable: role_changes, channel_changes
Other Events
| Event | Logged Data |
|---|---|
| Nickname Change | User, old nickname, new nickname |
| Voice State Update | User, channel joined/left/moved, mute/deaf status |
| Invite Created | Invite code, creator, channel, max uses, expires |
| Invite Deleted | Invite code, deleter |
Enable: nickname_changes, voice_states, invite_create, invite_delete
Ignored Channels & Roles
Exclude noisy channels or bot roles from logging.
Ignore Channel
/logs ignore channel channel:#bot-spam
All events in this channel are skipped.
Ignore Role
/logs ignore role role:@Dyno
Events triggered by members with this role are skipped (useful for other bots).
Remove Ignore
/logs ignore remove type:channel target:#bot-spam
/logs ignore remove type:role target:@Dyno
In the dashboard, use the multi-select chips interface.
Test Logs
Verify your configuration with a test log:
/logs test
Sends a sample log for each enabled category to confirm formatting and delivery.
Dashboard has a "Test Log" button that sends all enabled event types.
Dashboard Configuration
The Logging page (/dashboard/{guildId}/logging) provides:
- Master enable/disable toggle
- Log channel selector with permission check
- Per-event checkboxes with descriptions
- Ignored channels/roles chip management
- Include attachments / log bots toggles
- Test log button
- Configuration status indicator
Best Practices
- Dedicated channel: Use a private #mod-logs channel, not public chat
- Selective logging: Disable noisy events (voice_states, message_sent) in busy servers
- Ignore bots: Add other bot roles to ignored roles
- Ignore spam channels: Add #bot-commands, #spam to ignored channels
- Test after changes: Always use /logs test after modifying config
- Monitor log channel: Ensure it doesn't hit Discord's rate limits
Common Issues
Logs not appearing
Check: 1) Master logging enabled, 2) Specific event category enabled, 3) Channel not ignored, 4) Role not ignored, 5) Lyx has Send Messages/Embed Links in log channel, 6) Channel not deleted.
Missing message content in deletes
Requires "Read Message History" permission. Lyx caches recent messages; very old messages may not be cached.
Rate limited in log channel
Disable high-volume events (message_sent, voice_states). Use ignored channels for bot channels.
Test log sends nothing
At least one event category must be enabled. Check the specific event toggles.