Action Logging
SmartSpawner can record every important spawner action: who did it, where, and when. Use it for audit trails and moderation. Logging has two independent outputs, local log files and Discord, and each can be turned on or off on its own.
Log files
Log files are configured in the logging section of config.yml.
| Option | Default | What it does |
|---|---|---|
enabled | true | Turn the file logging system on or off. |
json_format | false | false writes human-readable lines. true writes structured JSON. |
console_output | false | Also print events to the server console. Useful for debugging. |
max_log_files | 10 | How many rotated log files to keep. The oldest are deleted first. |
max_log_size_mb | 10 | Size in MB a log file reaches before it rotates to a new one. |
log_all_events | false | Log every event. When true, the logged_events list is ignored. |
logged_events | list | The specific events to record when log_all_events is false. |
Discord logging
SmartSpawner can send the same events to a Discord channel through a webhook. This is configured separately in discord_logging.yml, so you can run Discord logging with or without file logging.
Set up the webhook
- In Discord, open your server settings.
- Go to Integrations, then Webhooks, then New Webhook.
- Choose the target channel and copy the webhook URL.
- In
discord_logging.yml, setenabledtotrueand paste the URL intowebhook_url.
Options
| Option | Default | What it does |
|---|---|---|
enabled | false | Turn Discord delivery on or off. |
webhook_url | empty | The Discord webhook URL. Required when enabled. |
show_player_head | true | Show the acting player's Minecraft head as the embed thumbnail. |
log_all_events | false | Forward every event. When true, the logged_events list is ignored. |
logged_events | list | The specific events to forward when log_all_events is false. |
Each event has its own embed template further down the file. You can change the title, color, description, and fields, and use placeholders such as {player}, {location}, {entity}, and {time} to fill in the details of each event.
Available events
Both outputs use the same event names.
Spawner: SPAWNER_PLACE, SPAWNER_BREAK, SPAWNER_EXPLODE, SPAWNER_STACK_HAND, SPAWNER_STACK_GUI, SPAWNER_DESTACK_GUI, SPAWNER_EGG_CHANGE
GUI: SPAWNER_GUI_OPEN, SPAWNER_STORAGE_OPEN, SPAWNER_STACKER_OPEN
Storage and selling: SPAWNER_EXP_CLAIM, SPAWNER_SELL_ALL, SPAWNER_ITEM_TAKE_ALL, SPAWNER_ITEM_DROP, SPAWNER_ITEMS_SORT, SPAWNER_ITEM_FILTER, SPAWNER_DROP_PAGE_ITEMS
Commands: COMMAND_EXECUTE_PLAYER, COMMAND_EXECUTE_CONSOLE, COMMAND_EXECUTE_RCON
