UltimateLogger
UltimateLogger is a comprehensive logging plugin for Paper/Spigot Minecraft servers. It provides detailed logging of various player and block events, with a flexible and powerful API for developers to extend its functionality.
Features
- Extensive Event Logging: Logs various events including:
- Player chat messages
- Player commands
- Player join/quit events (including IP address)
- Player deaths
- Block breaking
- Block placement
- Database Storage: Store logs in either SQLite (local file) or MySQL (remote database)
- In-game GUI: View and filter logs directly in-game, including single log view
- Log Management: Ability to archive logs to protect them from auto-deletion, and automatic log cleanup
- Discord Integration: Send log notifications to Discord via webhooks
- Flexible API: Easily extend the plugin with custom log definitions
- Configurable: Customize database settings, cache size, batch processing, enable/disable specific log types, and more
- Performance Optimized: Batch processing and connection pooling for minimal server impact
Installation
- Download the latest release from GitHub Releases or build from source
- Place the JAR file in your server's plugins folder
- Restart your server
- Configure the plugin in the plugins/UltimateLogger/config.yml file
Configuration
The plugin's configuration file (config.yml) allows you to customize various aspects of the plugin:
Code (Text):
# UltimateLogger Configuration
# Database settings
# type: can be "SQLITE" or "MYSQL"
database:
type: "SQLITE"
# Settings for SQLite
sqlite:
# The name of the database file.
# It will be created in the UltimateLogger plugin folder.
filename: "logs.db"
# Settings for MySQL
mysql:
host: "localhost"
port: 3306
database: "ultimatelogger"
username: "user"
password: "password"
# Connection pool settings
pool:
# Maximum number of database connections in the pool
max-size: 10
# Log Manager settings
logs:
# Cache settings
cache:
# Maximum number of pages to store in the cache
max-size: 100
# Time in minutes after which cache entries expire if not accessed
expiry-minutes: 5
# Batch processing settings
batch:
# Maximum number of logs to process in a single batch
size: 100
# Interval in ticks between batch processing (20 ticks = 1 second)
interval: 100
# Log types to disable
disabled-log-types:
- block_break
- block_place
# Webhook settings
webhooks:
#block_break:
# url: "https://discord.com/api/webhooks/1234567890/abcdefghijklmnopqrstuvwxyz"
#player_chat:
# url: "https://discord.com/api/webhooks/1234567890/abcdefghijklmnopqrstuvwxyz"
# condition: "message|=|test"
# How many days to keep logs before they are automatically deleted.
# Set to -1 to disable auto-deletion.
retention-period-days: 30
# How often (in minutes) the server should run the cleanup task to delete old logs.
cleanup-interval-minutes: 60
/code]
[SIZE=5][B]Usage[/B][/SIZE]
[SIZE=4][B]Commands[/B][/SIZE]
[LIST]
[*]/logger - Opens the log viewing GUI (requires ultimatelogger.view permission)
[*]/logger view <page> - View logs in chat (requires ultimatelogger.view permission)
[*]/logger log <id> - View a specific log by ID in a detailed GUI (requires ultimatelogger.view permission)
[*]/logger stats - View plugin statistics (requires ultimatelogger.stats permission)
[*]/logger reload - Reload the plugin configuration (requires ultimatelogger.reload permission)
[*]/logger help - Show help information
[*]/logger clean - Clean expired logs
[*]/logger clear <filter> - Clear logs matching filter
[/LIST]
[SIZE=4][B]Permissions[/B][/SIZE]
[LIST]
[*]ultimatelogger.view - Allows viewing logs
[*]ultimatelogger.stats - Allows viewing plugin statistics
[*]ultimatelogger.reload - Allows reloading the plugin configuration
[*]ultimatelogger.archive - Allows archiving logs to protect them from auto-deletion
[*]ultimatelogger.unarchive - Allows unarchiving logs to make them expire normally
[*]ultimatelogger.clear - Allows manual cleaning / clearing of the database
[/LIST]
[SIZE=5][B]Developer API[/B][/SIZE]
UltimateLogger provides a flexible API for developers to extend its functionality.
You can add your custom log types by following the tutorial on [URL='https://github.com/xef5000/UltimateLogger/blob/master/README.md']Github[/URL]