AuditTrail
Overview:
AuditTrail is a logging plugin used to track various types of events which occur on your server. It is the best event logger you will find that supports the latest spigot builds.
Logs are based on event listeners and can be written to a single server log, individual listener logs, individual player logs or to a mySQL database.
Unlike other loggers, AuditTrail is built with performance in mind utilizing multiple threads for logging and efficient database connection pools. A lot of effort has been taken to ensure this plugin has little to no impact of memory or CPU usage on your server by careful java profiling.
AuditTrail shows all events in an easy to read format without confusing numbers / id's and supports custom mobs, items, enchantments and lore. Detailed information regarding each event is logged to give you the complete picture as to what is happening on your server.
How good is the performance of AuditTrail? Very very good! mySQL logging can easily handle over 2000 events / second. Each file log can handle well over 1000 events / second. Try it out for yourself. The results will be surprising when compared to other outdated / unsupported logging plugins.
AuditTrail has very powerful mySQL event recycling (removal) which can be setup based on per server, per listener and global settings.
AuditTrail has as web server add-on called AuditTrail-Web which can be used to view mySQL logs and player information from a web browser. The resource can be found here.
For plugin update details, please refer to the change log below.
Need Help?
If you need help with the configuration or use of AuditTrail (or AuditTrail-Web), please send me a PM.
List of features:
* Supports ALL versions of 1.8, 1.9, 1.10 and 1.11
* Logs server and plugin information
* Multi-server support
* Player UUID support
* IP address logged for all player related events
* Custom mobs supported
* Custom items supported
* Custom enchantments supported
* Lore information supported
* Each listener can be individually enabled
* Each listener can be enabled to listen to one, many or all server worlds
* Each listener can have its own list of players to not audit (for staff or administrators)
* Individual player log files containing the events of a specific player for all enabled listeners
* Individual listener log files which contain only related events
* Server log file which contains all events from enabled listeners
* Configurable file sizes for player, listener and server logs
* Configurable time duration for player, listener and server logs
* Configuration validated when plugin starts
* Ability to reload configuration in game without server restart
* mySQL support
* Individual mySQL tables for each type of listener
* Items logged are easy to read names NOT id's / numbers
* Sub-items logged correctly instead of using parent item name (example: For lapis lazuli, the item name is "Lapis Lazuli" not "INK_SAC")
* Support for MCStats metrics collection
* Ability to automatically delete old mySQL log events after a configurable period of time
* Ability to configure how often to check to delete old mySQL log events
* Ability to log events using UNIX time/date stamp
* Time/Date stamp customizable
* Plugin will check for latest version onEnable
* File logging can be set to JSON format
* Event recycling can be configured for mySQL on listener, global or server level
Complete List of Events Logged:
Complete list of events logged
* Armor stand (adding or removing to/from an armor stand)
* Container access (adding or removing to/from a container)
* Creature spawn
* Dispenser use
* Entity damage
* Entity death (by players)
* Entity target
* Entity unleashing
* Player achievement earned
* Player bed (entering a bed)
* Player create / edit book
* Player block breaking (based on one, many or all types)
* Player block placing (based on one, many or all types)
* Player bucket emptying
* Player bucket filling
* Player chat
* Player command (based on one, many or all commands issued in game)
* Console command (based on one, many or all commands issued from the server console)
* Player brew potion
* Player craft (based on one, many or all items)
* Player death
* Player egg throw
* Player fish
* Player game mode change
* Player item interaction (includes accessing a chest, pressing a button, accessing a container, accessing a door, accessing a gate, eating a cake, priming TNT, using Bonemeal, using a lever, using a jukebox, using fireworks, activating a pressure plate, activating a tripwire and trampling crops)
* Player item consume
* Player item enchantment
* Player item drop (based on one, many or all items)
* Player item pickup (based on one, many or all items)
* Player join
* Player kick
* Player leashing
* Player level change
* Player mount / dismount
* Player quit
* Player shearing entity
* Player sign creation / modification
* Player smelting (using a furnace)
* Player tame
* Player teleport
* Player XP change
* Vehicle (create, destroy, enter or exit by a player)
* Custom player event (using API)
* Custom world event (using API)
List of advantages:
* The only logger to fully support all Minecraft 1.8 / 1.9 / 1.10 / 1.11 features, items, mobs, etc.
* The only logger to log server and plugins changes
* Full player UUID support
* Supports multiple servers logging to AuditTrail
* FAST Multi-threaded writing to player, listener and server log files to handle many events / second
* FAST Multi-threaded connection pool to mySQL to handle many events / second
* Individual player logs, individual listener logs or everything in a single server log
* Log files can be configured to roll over based on both size and time
* Ability to reload configuration without the need to restart the server
* Ignore specific player logging where YOU want exactly
* Logging based on per-world settings
* When logging items, will use correct text not ID's / numbers of parent item names
* Support for custom items, mobs, enchantments and lore
* Detailed mob information logged (e.g. If you kill a horse, the exact type, color and owner information logged)
* Very minimal memory and CPU footprint
* API support to log custom events
* The only logger to have regular consistent updates
* The only logger to write file logs in JSON format
Commands:
* /auditTrail help - Display help for AuditTrail
* /auditTrail reload - Reload AuditTrail configuration from file
Permissions:
* auditTrail.help - To display help for AuditTrail
* auditTrail.reload - To reload AuditTrail configuration from file
How to configure:
* Place AuditTrail.jar into your server plugins folder
* Restart your server
* Modify the configuration file to enable the required listeners and filters
* Restart your server or reload the configuration
NOTE: If you are upgrading from a previous version, move your configuration file to another location and let the plugin regenerate the new configuration file.
API Documentation:
API documentation
Add AuditTrail as an external library into your IDE.
The AuditTrail API supports two different types of events which can be logged:
1. Player Event
This type of event includes the following information:
- Server Name, Time/Date, Event Name, Player Name, Player UUID, IP Address, Game Mode, isOP, Event Data, World Name, X, Y, Z
In order to log custom player events, the listener must first be enabled in the AuditTrail configuration file. To do so, change auditPlayer to true in the customAPI section.
Add the following import to your plugin:
import com.tbakonyi.AuditTrail.API.AuditTrailAPI_PlayerEvent;
Create a player event object and initialize the data. The player event requires Event Name (String), Event Data (String) and a Player object:
String eventName = "MyTestPlayerEvent";
String eventData = "This is my player event data";
Player player = somePlayerObject;
AuditTrailAPI_PlayerEvent myPlayerEvent = new AuditTrailAPI_PlayerEvent(eventName, eventData, player);
Raise/Fire the event to have AuditTrail log the event
Bukkit.getServer().getPluginManager().callEvent(myPlayerEvent);
Methods for AuditTrailAPI_PlayerEvent:
String getEventName() - Returns the event name of the event
String getEventData() - Returns the event data of the event
Player getPlayer() - Returns the player object of the event
void setEventName(String) - Sets the event name of the event
void setEventData(String) - Sets the event data of the event
void setPlayer(Player) - Sets the player object for the event
NOTE: Do not forget to add AuditTrail to your plugin.yml depend. Example: depend: [AuditTrail]
2. World Event
This type of event includes the following information:
- Server Name, Time/Date, Event Name, Event Data, World Name, X, Y, Z
In order to log custom world events, the listener must first be enabled in the AuditTrail configuration file. To do so, change auditWorld to true in the customAPI section.
Add the following import to your plugin:
import com.tbakonyi.AuditTrail.API.AuditTrailAPI_WorldEvent;
Create a world event object and initialize the data. The world event requires Event Name (String), Event Data (String) and a Location object:
String eventName = "MyTestWorldEvent";
String eventData = "This is my world event data";
Location locaiton = someLocationObject;
AuditTrailAPI_WorldEvent myWorldEvent = new AuditTrailAPI_WorldEvent(eventName, eventData, location);
Raise/Fire the event to have AuditTrail log the event:
Bukkit.getServer().getPluginManager().callEvent(myWorldEvent);
Methods for AuditTrailAPI_WorldEvent:
String getEventName() - Returns the event name of the event
String getEventData() - Returns the event data of the event
Location getLocation() - Returns the location object of the event
void setEventName(String) - Sets the event name of the event
void setEventData(String) - Sets the event data of the event
void setLocation(Location) - Sets the location object for the event
NOTE: Do not forget to add AuditTrail to your plugin.yml depend. Example: depend: [AuditTrail]
IMPORTANT: Custom events will be logged to file if the appropriate file logging options are enabled within the AuditTrail configuration file. Likewise, mySQL logging will only be enabled if the appropriate mySQL options are enabled/set.
If you select to log to file, the following listener files will be created:
AuditTrailAPI_PlayerListener.log (for player events)
AuditTrailAPI_WorldListener.log (for world events)
If you select to log to mySQL, the following tables will be used to store data:
customAPI_player (for player events)
customAPI_world (for world events)
Change Log:
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
26.2MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.9MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
4.7MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta