AuditTrail 5.1

The best file and mysql event logger for Minecraft PERIOD.

  1. Tbakonyi
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    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:

    * 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:

    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:

    Version 5.1
    New Features
    - updated to support Minecraft 1.11.2


    Version 5.0

    New Features
    - updated to support Minecraft 1.11


    Version 4.22

    Fixes
    - users table and / or default admin user not created for AuditTrail-Web


    Version 4.21

    Fixes
    - corrected exception when trying to create players table on mySQL
    servers that have NO_ZERO_DATE mode enabled


    Version 4.2

    New Features
    - added mySQL version information to AuditTrail log for troubleshooting
    purposes
    - added ability to migrate configuration files from one version to another.
    This is done automatically by the plugin when it runs for the first time. A
    backup copy of the configuration file will be made during the conversion
    process
    - compiled with spigot-api-1.10.2-R0.1-SNAPSHOT-shaded.jar
    - added player log recycling to all recyclers (listener, global and server)

    Fixes
    - corrected minor spelling mistakes and grammar in documentation
    within configuration file
    - added leash event to server event recycling
    - added leash event to global event recycling
    - global event recycler not observing keepEvents configuration
    - custom events not properly recycled using listener, global or server
    event recyclers


    Version 4.1
    New Features
    - added ability to log FILE events using JSON format
    - time played on a server by a player logged to mySQL players table

    Fixes
    - corrected logic problem which prevented some playerInteract events to
    be logged
    - removed debug logging for spawn eggs from main AuditTrail log file
    - corrected gameMode in players table when logging out


    Version 4.01

    Fixes
    - changed plugin monitor to do the initial check 2 minutes after the server is
    started. This change is done to ensure all plugins had a chance to load on
    server startup
    - corrected users table not being updated correctly for AuditTrail-Web
    permissions for the admin user
    - corrected upgrade of users table for non-admin users for AuditTrail-Web
    - reduced the size of the JAR file by almost half


    Version 4.0
    New Features
    - updated to support Minecraft 1.10
    - added plugin monitor to log status of plugins. This information can be written
    to file or mySQL and is useful to troubleshoot plugin errors and track plugin
    updates over time.
    - added server monitor to log server status. This information can be written
    to file or mySQL and is useful to track server updates over time.
    - added per server mysql event recycling
    - added per listener mysql event recycling
    - mySQL event recycling documentation can be found within the AuditTrail
    configuration file.
    - added smelt listener (log items smelted by a player)
    - listeners disabled by default if world list is empty. A log indicator has been
    added to warn about this scenario
    - server implementation information now saved to servers table

    Fixes
    - listener log settings now using proper configuration instead of using player
    log settings
    - corrected NPE in specific scenarios when attempting to get mob owner
    attribute
    - corrected NPE in specific scenarios when using container listener
    - corrected NPE in specific scenarios when using player interact listener
    - corrected some mySQL events were not being recycled
    - checked introduced to ensure mySQL table prefix is not blank. Default value
    of "auditTrail_" will be used. This corrected a mySQL exception on load/reload.
    - mySQL event recycling will now only be checked once per hour and it is not
    configurable.
    - corrected server version being updated in servers table
    - corrected having container listener enabled for brew listener to work
    - corrected having container listener enabled for vehicle listener to work
    - corrected NPE when AuditTrail used in unsupported Minecraft version


    Version 3.62
    New Features
    - Horse attributes now show if carrying a chest

    Fixes
    - corrected NPE in specific scenarios when a horse entity is killed when
    entityDeath listener enabled


    Version 3.61

    Fixes
    - corrected entityDeath NPE if listener is not enabled
    - corrected eggThrow listener logging if not enabled
    - corrected gameModeChange listener creating SQL tables when it should not


    Version 3.6

    New Features
    - added brew listener (log potions created using brew stand)
    - added achievement listener (logs achievements earned by players)
    - added eggThrow listener (logs eggs thrown by a player)
    - added gameModeChange listener (logs when a player changes game mode)
    - added mount listener (logs when a player mounts/dismounts a living entity)
    - added missing mob attributes (e.g. is sheep sheared, is pig saddled, name)

    Fixes
    - corrected reversed Y and Z coordinates for player locations
    - corrected armorStand listener to use armor stand location instead of player
    - corrected bed listener to use bed location instead of player
    - corrected container listener to use container location instead of player
    - corrected dispenser listener to use dispenser location instead of player
    - corrected enchant listener to use enchant table location instead of player
    - vehicle listener will not log mounting and dismounting of living entities
    - corrected NPE if container listener enabled and using a horse container
    - corrected NPE when trying to get mob attributes for tamed entities
    - corrected NPE when trying to get itemStack name in specific scenarios


    Version 3.52
    Fixes
    - corrected exception when plugin loading if playerLog not enabled


    Version 3.51

    New Features
    - added support for Minecraft version 1.9.4


    Version 3.5

    New Features
    - added dispenser listener (log items dropped by dispenser / dropper)
    - added leash listener (log entities leashed by a player)
    - added unleash listener (log entities unleashed)

    Fixes
    - events not logged after issuing /audittrail reload command
    - corrected AuditTrailAPI_WorldListener log file name
    - proper cleanup of objects on plugin reload / disable
    - fixed exception when logging certain player IP addresses


    Version 3.4

    New Features
    - added useUnixTimeFormat to configuration file to log events using UNIX
    time/date stamp format
    - timeStamp configuration file entry changed to timeStampFormat and moved into general plugin settings section
    - added player IP address field to all player related listeners
    - added ability to show/hide player IP address in file log configuration
    - added API to log player and world events
    - updated all maven dependencies to latest version
    - added version check on plugin enable
    - added support for AuditTrail-Web 1.7


    Version 3.3
    New Features
    - added multi-server logging support for both file and mysql logging
    - added ShowServerName option in configuration file for file logging
    - added support for AuditTrail-Web 1.6

    Fixes
    - corrected NPE when clicking empty slot when container listener enabled


    Version 3.2

    New Features
    - added armor stand listener (triggered when a player adds or removes armor from an armor stand)
    - added vehicle listener (triggered when a player creates, deletes, enters or
    exits a vehicle)
    - added identification of enchantment books for Minecraft 1.8
    - player interact listener now logs firework, jukebox and crop trample events
    - added ability to select which events to log for player interact listener in
    configuration file
    - added support for AuditTrail-Web 1.5

    Fixes
    - potion names for Minecraft 1.8 same format as Minecraft 1.9
    - book listener now uses showLore and showEnchants when logging to file or mySQL player log
    - fish listener now uses showLore and showEnchants when logging to file or mySQL player log
    - enchantments field in mySQL no longer has [] around the enchantment list
    - sign lines text in mySQL no longer has [] around the text
    - enchant listener item names consistent with other listeners now
    - gameMode and isOP field data now using title case
    - event data now using title case (instead of all capitals)
    - block break, block place and player interact listeners now use and output the same item names as other item listeners
    - corrected improper player interact logging when right clicking on grass in
    specific scenarios


    Version 3.1

    New Features
    - added support for AuditTrail-Web 1.4 (which fully supports Minecraft 1.9)
    - added ability to ignore player inventory container changes

    Fixes
    - Slightly Damaged Anvil and Very Damaged Anvil correctly saved to player
    inventory database tables
    - Banner color items saved correctly to player inventory database tables
    - Potion of Healing (Instant Heal II) and Potion of Harming (Instant Damage II)
    now correctly identified
    - Tipped Arrow of Healing (Instant Heal II) and Tipped Arrow of Harming
    (Instant Damage II) now correctly identified
    - entityDamage listener now reads world filter properly from configuration file
    - tame listener now reads world and player filter properly from configuration file
    - updated itemList.txt for new Minecraft 1.9 items


    Version 3.0
    New Features
    - added support for Minecraft 1.9
    - added container listener
    - now able to get specific list of enchantments from enchantment books (1.9)
    - now able to get exact potion duration length and type from potions (1.9)

    Fixes
    - corrected friendly name of orange wool
    - corrected friendly name of acacia fence gate
    - corrected additional "N/A" text on QuitListener when file logging
    - many item names corrected to match in game name better
    - when writing player inventory information to mySQL, boots were overwriting the legs slot in specific scenarios


    Version 2.51

    Fixes
    - fixed crash when event recycler trying to remove events from tables which do not exist
    - fixed achievement "mine wood" being removed from players on logout


    Version 2.5
    New Features
    - added mySQL log event recycler which will delete any log event greater than the configured recycle period. This deletion will occur once every number of configured hours. By default the event recycler is turned OFF and set to delete events older than 30 days once every 24 hours
    - added player edit book listener
    - changed "none" to "None" for both lore and enchantment logging
    - changed item name logging to friendly name instead of internal object name
    - supports AuditTrail-Web 1.3 ONLY


    Version 2.4

    New Features
    - added player interact listener
    - added fish listener
    - player inventories logged to database on login and logout
    - supports AuditTrail-Web 1.2 ONLY

    Fixes
    - Added some missing items to the item master item list
    - Corrected some item names in the master item list
    - Corrected a few potion names


    Version 2.3
    New Features
    - added mySQL player logs. When enabled will log all player specific events to the "playerLog" table. This data is used by AuditTrail-Web to perform user specific queries
    - added support to save player information on login and logout for viewing in AuditTrail-Web
    - supports AuditTrail-Web 1.1 ONLY


    Version 2.2
    New Features
    - added support for AuditTrail web interface add-on. This resource will be available on Spigot.

    Fixes
    - Corrected wrong material in Bucket Fill event logging
    - Removed invalid entities from Entity Damage event logging


    Version 2.1
    New Features
    - added entity target listener
    - added shear listener

    Fixes
    - Corrected null pointer exception when loading plugin in specific scenarios


    Version 2.0
    New Features
    - further optimizations to both file and mySQL logging to increase performance
    - mySQL batch insert support added to significantly increase performance
    - thread pool now used for mySQL logging to increase performance
    - added creature spawn listener
    - added tame listener
    - added MCStats metrics information

    Fixes
    - rare crash when database tables are initially created
    - console listener command filter not working
    - command listener command filter not working
    - a few events not logged when plugin is disabled or server shutdown
    - reload configuration correctly reads and applies all changes made to the
    plugin configuration file
    - plugin releases all memory and objects on disable
    - exception when upgrading database tables which do not exist
    - correctly check and save itemList.txt on startup


    Version 1.5
    New Features
    - added entityDamage listener
    - added entityDeath listener
    - improved efficiency of listeners by minimizing number of objects to create and use during log text creation
    - added option to show lore and show enchantments for file logging in the configuration file
    - custom entity names will be correctly logged for entityDamage, entityDeath and playerDeath listeners
    - custom items will be correctly logged for for all item specific listeners
    (i.e. blockBreak, blockPlace, craft, itemConsume, itemDrop and itemPickup). If the item contains a custom display name, that will be logged instead of its default name.
    - craft, itemConsume, itemDrop and itemPickup listeners will now log lore information (if set)
    - itemDrop and itemPickup listeners will now log enchantment information (if any)
    - added mob attributes to entityDamage, entityDeath and playerDeath listeners. Attributes include isBaby, isVillager, isTamed (+owner), type (for mobs like horse, rabbit, sheep, ocelot, skeleton)

    To add support for custom items, simply add the name of the item to the itemlist.txt file (located in the AuditTrail plugin directory).

    Fixes
    - renamed death listener to playerDeath
    - added missing enchant listener configuration settings to log file
    - case is now ignored when determining if an item is within a list
    - corrected duplicate event listener function names


    Version 1.31
    Fixes
    - changed plugin name to AuditTrail to better describe its functionality


    Version 1.3
    New Features
    - Added bed listener
    - Added itemConsume listener
    - Added xpChange listener

    Fixes
    - itemPickup listener filters incorrectly using itemDrop listener filters
    - added missing : after Location in all file logs


    Version 1.2
    New Features
    - Added itemDrop listener
    - Added itemPickup listener

    Fixes
    - blockBreak, blockPlace, craft, itemDrop and itemPickup listeners now use full
    item list found in itemList.txt (located in the AuditTrail plugin folder) to correctly
    log sub-items. Example: Instead of showing INK_SAC for lapis lazuli, it will now
    log LAPIS_LAZULI.


    Version 1.1
    New Features
    - Each listener logging to its own mySQL table
    - Each listener table in mySQL contains only relevant columns for that event
    - Added mySQL table prefix to configuration
    - Added bucketFill listener
    - Added cause to teleport listener logging

    Fixes
    - chat message length too short when logging to mySQL
    - command message length too short when logging to mySQL
    - console command length too short when logging to mySQL
    - enchantment list length too short when logging to mySQL
    - kick reason length too short when logging to mySQL
    - teleport listener source Y and Z world coordinates reversed
    - renamed bucket listener to bucketEmpty


    Version 1.0
    - Initial released version


    Support / Questions:

    If you have a problem with AuditTrail or have a question, DO NOT use the review section. Please send a PM and I will respond back shortly.


    New Features:

    I am looking for any feedback to improve or enhance AuditTrail. Feature requests can be made within the discussion section.


    Compatibility Java / Minecraft / MySQL:

    AuditTrail was written in Java 7 using spigot-api-1.11-R0.1-SNAPSHOT. It was specifically tested using versions 1.8.8, 1.9, 1.9.2, 1.9.4, 1.10 and 1.11 servers running Java 1.8 but should be compatible with any version of Minecraft 1.8 / 1.9 / 1.10 / 1.11 or Java versions 1.7 / 1.8.

    IMPORTANT: In order to use AuditTrail database functionality, you must have mySQL version 5.6 or higher installed.


    Terms of service:

    * You are not permitted to decompile or modify the plugin in any form
    * You agree to make an effort to get help (by PM'ing me) if you are having problems, before leaving a review.
    * You will not ask for features in the review

    * You are not allowed to claim the source/binary code of the plugin as your own
    * You are not allowed to resell this plugin
    * The terms of service may change at any time, and you agree to abide by the most recent version of this.
    Manic97 likes this.

Recent Reviews

  1. Zedwick
    Zedwick
    5/5,
    Version: 4.01
    This is an excellent logging plugin with fantastic support from an enthusiastic developer. My first (and only) criticism is the lack of rollback, but it's got accurate logging and active development and support which I feel is much more important given the state of some of the other logging plugins.

    Definitely check out AuditTrail-Web, the web interface for this plugin, which gives a great overview of all servers across the network; especially after the recent server version and plugin version and status logging.

    I'm more than happy with AuditTrail, and am excited for the future as development continues.
    1. Tbakonyi
      Author's Response
      Thanks for the feedback. Your suggestions have really moved the plugin forward.
  2. iZephyrs
    iZephyrs
    4/5,
    Version: 3.3
    I love this plugin, Very easy to work with and manage but do you reckon you could make it Log a users IP?
    1. Tbakonyi
      Author's Response
      The player join listener logs the IP address. Take a look.
  3. Nutty101
    Nutty101
    5/5,
    Version: 2.4
    I know I wrote a review for this earlier, but I cannot say how handy this plugin is. When used right, you have 100% indisputable proof about who did what. When the users know you can see logs of everything, all the issues pretty much stop.

    Also to note, the dev is beyond responsive to requests and input.
  4. Nutty101
    Nutty101
    5/5,
    Version: 2.1
    Awesome plugin, does what it says and very well. Kudos's to the dev(s) for quickly fixing the issue that I had with it.
    1. Tbakonyi
      Author's Response
      Thanks for the feedback.
  5. ThisTimeCrafting
    ThisTimeCrafting
    4/5,
    Version: 1.3
    Very good plugin! Easy to use and not complicated :D I would prefer to everybody to give it a try ;)!
    1. Tbakonyi
      Author's Response
      Thanks very much.